containers / containers/podman-compose

Cannot connect to docker deamon - when trying to connect to podman.socket

Open
#1,126 11 comments 5 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6.2k
Forks
622
PR merge metrics
No merged PRs in 30d

Description

Moving to Fedora Silverblue I am trying to use podman-compose (instead of docker-compose on Manjaro).
But I have trouble with connecting to the socket, first I had access denied, I added `:Z` for the podman.sock volume. Now I get address in use.
```
caddy-proxy:
container_name: caddy-proxy
image: lucaslorentz/caddy-docker-proxy:ci-alpine
restart: always
networks:
- caddy-net
environment:
- CADDY_INGRESS_NETWORKS=net-caddy
- CADDY_DOCKER_NO_SCOPE=true
volumes:
- /run/user/1000/podman/podman.sock:/var/run/docker.sock:Z
- $DOCKERDIR/network/caddy-proxy/caddy_data:/data:Z
- $DOCKERDIR/network/caddy-proxy/config:/config:Z
ports:
- 443:443
- 80:80
labels:
caddy.email: $EMAIL
```

I checked a few things:
`sudo ls -al /run/podman/podman.sock`
```
srw-rw----. 1 root root 0 Jan 30 22:09 /run/podman/podman.sock
```
But for the user:
```
ls -al /run/user/1000/podman/podman.sock
total 0
drwxr-xr-x. 2 asterix asterix 40 Jan 30 21:58 .
drwxr-xr-x. 3 asterix asterix 60 Jan 30 21:58 ..
```
When I check this: `systemctl --user start podman.socket`
```
Job failed. See "journalctl -xe" for details.
```

`systemctl --user status podman.socket`
```
podman.socket - Podman API Socket
Loaded: loaded (/usr/lib/systemd/user/podman.socket; enabled; preset: disabled)
Active: failed (Result: resources)
Invocation: b207bb9023df45ebaaa079780d4aa586
Triggers: ● podman.service
Docs: man:podman-system-service(1)
Listen: /run/user/1000/podman/podman.sock (Stream)

Feb 01 11:57:31 obelix.o systemd[1449]: podman.socket: Failed with result 'resources'.
Feb 01 11:57:31 obelix.o systemd[1449]: Failed to listen on podman.socket - Podman API Socket.
Feb 01 11:57:37 obelix.o systemd[1449]: podman.socket: Failed to create listening socket (/run/user/1000/podman/podman.sock): Address already in use
Feb 01 11:57:37 obelix.o systemd[1449]: podman.socket: Failed to listen on sockets: Address already in use
Feb 01 11:57:37 obelix.o systemd[1449]: podman.socket: Failed with result 'resources'.
Feb 01 11:57:37 obelix.o systemd[1449]: Failed to listen on podman.socket - Podman API Socket.
Feb 01 12:01:22 obelix.o systemd[1449]: podman.socket: Failed to create listening socket (/run/user/1000/podman/podman.sock): Address already in use
Feb 01 12:01:22 obelix.o systemd[1449]: podman.socket: Failed to listen on sockets: Address already in use
Feb 01 12:01:22 obelix.o systemd[1449]: podman.socket: Failed with result 'resources'.
Feb 01 12:01:22 obelix.o systemd[1449]: Failed to listen on podman.socket - Podman API Socket.
```

Address already in use?
I thought running this without sudo: `systemctl enable podman.socket` (and start) would be the same as `systemctl --user enable podman.socket` (and start).

So I tried:
`systemctl stop podman.socket` and `systemctl disable podman.socket` and then:
`systemctl --user enable podman.socket` and `systemctl --user start podman.socket`, but still same result, address already in use.

What am I missing here?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.