Sample Header Ad - 728x90

Accessing Docker Unix Socket from a Podman Container on a Remote Server (SSH)

0 votes
0 answers
403 views
I'm trying to access a **Docker** Unix socket on a remote server from within a **Podman** container (offen/docker-volume-backup). I've (root-)mounted the entire root filesystem of the remote server using sshfs and can access it as root. However, I can't connect to the Unix socket. (All servers are on AlmaLinux with SELinux, and Podman is used with sudo.) I've tried the following settings in my Podman container:
volumes:
  - /mnt/fuse_to_somewhere/var/run/docker.sock:/var/run/docker.sock:ro,z
security_opt:
  - label=disable
privileged: 
  - true
But I still get this error:
Commands: error querying for containers: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Questions: 1. What steps are needed to connect to the Docker Unix socket from a Podman container? 2. Are there specific permissions required for accessing the Docker socket over sshfs?
Asked by Jack (1 rep)
Feb 21, 2025, 05:05 PM
Last activity: Feb 21, 2025, 05:22 PM