diff --git a/docs/guides/podman.md b/docs/guides/podman.md index 825580be2..d197dcd6a 100644 --- a/docs/guides/podman.md +++ b/docs/guides/podman.md @@ -14,3 +14,35 @@ Then set the environment variable `DOCKER_HOST` to the socket so `func` knows wh ❯ func build -v ``` Now you may use `func` as usual. + +## macOS + +Under macOS you need to use `podman machine` as `podman` is native to Linux. + +``` +❯ brew install podman +❯ podman machine init --cpus=2 --disk-size=30 --memory=8192 +❯ podman machine start +❯ ssh-add -k $HOME/.ssh/podman-machine-default +❯ export DOCKER_HOST=(podman system connection ls --format="{{.URI}}" | grep root) +``` + +## Known issues + +* In func version 0.19, some runtimes might be unable to build a function by using podman. You might see an error message similar to the following: + + ``` + ERROR: failed to image: error during connect: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.40/info": EOF + ``` + * The following workaround exists for this issue: + * Update the podman service by adding --time=0 to the service ExecStart definition in the podman configuration file at `/etc/systemd/user/podman.service`.You might need to copy the default configuration file from `/usr/lib/systemd/user/podman.service` first. +

+ Example service configuration: + + `ExecStart=/usr/bin/podman $LOGGING system service --time=0` +

+ After editing the configuration files you need to reload/restart service: + ``` + ❯ systemctl --user daemon-reload + ❯ systemctl restart --user podman.socket + ```