Using systemctl (#481)

Using systemctl is a better idea because users can utilize other subcommands like `status` or `stop` to further manage the podman service.
This commit is contained in:
Chris Suszynski 2021-08-17 18:13:17 +02:00 committed by GitHub
parent fcf9e77cb9
commit e82f12073f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -4,13 +4,13 @@ Under Linux, it is possible to use [podman](https://podman.io/) instead of [dock
In order to do this you need to run `podman` as a service. You can do this with the following command.
```
podman system service --time=0
systemctl start --user podman.socket
```
This will serve the Docker API on a UNIX socket at `/run/user/{uid}/podman/podman.sock`.
This will serve the Docker API on a UNIX socket at `${XDG_RUNTIME_DIR}/podman/podman.sock` (on most systems that would be `/run/user/{uid}/podman/podman.sock`).
Then set the environment variable `DOCKER_HOST` to the socket so `func` knows where to connect.
```
export DOCKER_HOST="unix:///run/user/$(id -u)/podman/podman.sock"
export DOCKER_HOST="unix://${XDG_RUNTIME_DIR}/podman/podman.sock"
func build -v
```
Now you may use `func` as usual.