Hello!
I don't have a lot of experience with Proxmox, but I was wondering if it's possible to share a docker network created with a docker-compose.yml between several LXC containers.
I'm not familiar with docker swarm, that's why I want to know if this is possible before trying to use it.
I know that LXC containers share resources from the host machine, that's why I was wondering if I can mount the
So far I've tried to mount the
On the Proxmox host, create a new group for Docker:
Change the ownership of the Docker socket:
Modify the permissions of the Docker socket:
Edit the LXC container's configuration file and add the following lines:
And after these changes I got stuck, because I'm having issues with the permissions on the file mounted on
Does anybody know if this is possible?
![Screenshot 2024-07-11 at 11.30.03 a.m..png Screenshot 2024-07-11 at 11.30.03 a.m..png](https://forum.proxmox.com/data/attachments/70/70893-af967ada384df6ce6f5f9b7ef0713468.jpg)
I don't have a lot of experience with Proxmox, but I was wondering if it's possible to share a docker network created with a docker-compose.yml between several LXC containers.
I'm not familiar with docker swarm, that's why I want to know if this is possible before trying to use it.
I know that LXC containers share resources from the host machine, that's why I was wondering if I can mount the
/var/run/docker.sock
into the LXC containers.So far I've tried to mount the
/var/run/docker.sock
like this:On the Proxmox host, create a new group for Docker:
Code:
groupadd -g 1000 docker_sock
Change the ownership of the Docker socket:
Code:
chown root:docker_sock /var/run/docker.sock
Modify the permissions of the Docker socket:
Code:
chmod 660 /var/run/docker.sock
Edit the LXC container's configuration file and add the following lines:
Code:
lxc.mount.entry: /var/run/docker.sock mnt/docker.sock none bind,create=file
lxc.idmap: u 0 100000 65536
lxc.idmap: g 0 100000 65536
lxc.idmap: g 0 100000 1000
lxc.idmap: g 1000 1000 1
lxc.idmap: g 65534 165534 1
And after these changes I got stuck, because I'm having issues with the permissions on the file mounted on
mnt/docker.sock
because I tried to create a symlink to /var/run/docker.sock
inside the container.Does anybody know if this is possible?
![Screenshot 2024-07-11 at 11.30.03 a.m..png Screenshot 2024-07-11 at 11.30.03 a.m..png](https://forum.proxmox.com/data/attachments/70/70893-af967ada384df6ce6f5f9b7ef0713468.jpg)