I'd like to use the docker-maven-plugin (0.33.0) with podman (2.0.6). According to this issue this should be possible - at an experimental stage. Here is, what I did.
Set an alias for docker
alias docker=podman
Start podman REST service
podman system service -t 0 &
Set DOCKER_HOST to the socket file
unix:/run/user/7001/podman/podman.sock
Try to build an image from a dockerfile
mvn docker:build
And get:
[INFO] Building tar: /[...]/tmp/docker-build.tar
[INFO] DOCKER> [myapp:latest] "myapp": Created docker-build.tar in 918 milliseconds
Sep 02, 2020 2:39:24 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (jnr.enxio.channels.NativeException) caught when processing request to {}->unix://127.0.0.1:1: Connection reset by peer
Sep 02, 2020 2:39:24 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->unix://127.0.0.1:1
Sep 02, 2020 2:39:25 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (jnr.enxio.channels.NativeException) caught when processing request to {}->unix://127.0.0.1:1: Connection reset by peer
Sep 02, 2020 2:39:25 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->unix://127.0.0.1:1
Sep 02, 2020 2:39:25 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (jnr.enxio.channels.NativeException) caught when processing request to {}->unix://127.0.0.1:1: Connection reset by peer
Sep 02, 2020 2:39:25 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->unix://127.0.0.1:1
[ERROR] DOCKER> Unable to build image [myapp] : Connection reset by peer [Connection reset by peer]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
It seems, that it is not a permission problem. I'm able to connect to the socket with curl and with the same user
curl -i --unix-socket /run/user/7001/podman/podman.sock http://localhost/info
... 200 OK ... and json payload
Any idea what possibly goes wrong in my setup?