linuxmint / linuxmint/cinnamon
Docker container volume mounts being attached as individual mounts with changed docker folder
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.6k
- Forks
- 915
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 3
Description
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.
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue on Mint 22 by moving Docker's data-root to /home/$USER/docker with /etc/docker/daemon.json, then starting the Penpot compose example. Compare the resulting mounts in Nemo and on the desktop; done means Docker volumes no longer appear as individual filesystem mounts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100