21.2. Enabling the Podman API using systemd in rootless mode
You can use systemd to activate the Podman API socket and podman API service.
Prerequisites
The
podman-remotepackage is installed.# dnf install podman-remote
Procedure
Enable and start the service immediately:
$ systemctl --user enable --now podman.socketOptional: To enable programs by using Docker to interact with the rootless Podman socket:
$ export DOCKER_HOST=unix:///run/user/<uid>/podman//podman.sock
Verification
Check the status of the socket:
$ systemctl --user status podman.socket ● podman.socket - Podman API Socket Loaded: loaded (/usr/lib/systemd/user/podman.socket; enabled; vendor preset: enabled) Active: active (listening) since Mon 2021-08-23 10:37:25 CEST; 9min ago Docs: man:podman-system-service(1) Listen: /run/user/1000/podman/podman.sock (Stream) CGroup: /user.slice/user-1000.slice/user@1000.service/podman.socketThe
podman.socketis active and is listening at/run/user/<uid>/podman.podman.sock, where<uid>is the user’s ID.Display system information of Podman:
$ podman-remote info