From addd865452bb4c507959d1cfdd3305cfed399e36 Mon Sep 17 00:00:00 2001 From: Matej Vasek Date: Thu, 2 Dec 2021 17:14:46 +0100 Subject: [PATCH] docs: `podman`: known issue + macOS doc (#698) * docs: `podman`: known issue + macOS doc Signed-off-by: Matej Vasek * fixup: doc Signed-off-by: Matej Vasek * Update docs/guides/podman.md Co-authored-by: Lance Ball * fixup: style Signed-off-by: Matej Vasek Co-authored-by: Lance Ball --- docs/guides/podman.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) 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 + ```