docs: `podman`: known issue + macOS doc (#698)

* docs: `podman`: known issue + macOS doc

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: doc

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Update docs/guides/podman.md

Co-authored-by: Lance Ball <lball@redhat.com>

* fixup: style

Signed-off-by: Matej Vasek <mvasek@redhat.com>

Co-authored-by: Lance Ball <lball@redhat.com>
This commit is contained in:
Matej Vasek 2021-12-02 17:14:46 +01:00 committed by GitHub
parent 3f07ca1310
commit addd865452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 32 additions and 0 deletions

View File

@ -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.
</br></br>
Example service configuration:
`ExecStart=/usr/bin/podman $LOGGING system service --time=0`
</br></br>
After editing the configuration files you need to reload/restart service:
```
systemctl --user daemon-reload
systemctl restart --user podman.socket
```