Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker container volume mounts being attached as individual mounts with changed docker folder #12527

Open
SpeeQz1 opened this issue Nov 27, 2024 · 1 comment
Labels

Comments

@SpeeQz1
Copy link

SpeeQz1 commented Nov 27, 2024

Distribution

Mint 22

Package version

6.2.9

Graphics hardware in use

NVIDIA GeForce RTX 4060 Ti

Frequency

Always

Bug description

Usually when you start a docker container with binded volumes to your file system directory they won't appear as attached devices in the Nemo file manager or your desktop.

An unusual thing happens when you move your docker folder to a different place (for example /home/user). The volumes for docker containers get mounted to the file system and you visually can see them even though you aren't supposed to.

Note: My system uses 2 different partitions / and /home.

image
image

Steps to reproduce

To install docker: Docker Install Ubuntu

Provided bellow are commands to change the directory of the docker folder.

Stop docker:

sudo service docker stop
sudo systemctl stop docker.socket

Create new directory:

mkdir /home/$USER/docker

Add config to docker:

sudo tee /etc/docker/daemon.json << EOF
{
  "data-root": "/home/$USER/docker"
}
EOF

Copy files:

sudo rsync -aP /var/lib/docker/ /home/$USER/docker

Rename old docker:

sudo mv /var/lib/docker /var/lib/docker.old

Restart docker:

sudo service docker start

Remove old folder (unmounting volumes):

//If resource is busy

sudo grep /var/lib/docker /proc/mounts | awk '{ print $2 }' | tac | sudo xargs -n 1 umount 

sudo rm -rf /var/lib/docker.old

Run example docker containers like Penpot:

wget https://raw.githubusercontent.com/penpot/penpot/main/docker/images/docker-compose.yaml

sudo docker compose -p penpot -f docker-compose.yaml up -d

Expected behavior

When creating docker volumes they shouldn't be mounted as separate file system mounts and appear on both the Desktop or Nemo File manager.

Additional information

No response

@SpeeQz1 SpeeQz1 added the BUG label Nov 27, 2024
@SpeeQz1
Copy link
Author

SpeeQz1 commented Nov 27, 2024

I am not sure whether this should be reported in linuxmint or nemo so I went with Cinnamon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant