Docker Community Forums

Share and learn in the Docker community.

Container -v volumes not syncing files between storage and container

(Danieldemers) #1

Issue in sharing files between container and origin storage…I run the below command to bring up a container but when I generate new files in the mounted volume they do not propagate outside the container…as in I do not see the new files on the origin storage.

Reference of topology:

SMB Share ---- Mounted on CentOS HOST ---- Volume mounted on container

I see the correct config showing it is mounted.

docker container run -p 8181:8181 --restart always --name plexpy --detach -it --volume /mnt/freenas/misc/Software/PlexPy:/mnt/ linuxserver/tautulli /bin/bash

        "Mounts": [
                "Type": "bind",
                "Source": "/mnt/freenas/misc/Software/PlexPy",
                "Destination": "/mnt",
                "Mode": "",
                "RW": true,
                "Propagation": ""

[admin@centos ~]$ docker att 17d90a7d355c
docker: 'att' is not a docker command.
See 'docker --help'
[admin@centos ~]$ docker container attach 17d90a7d355c
root@17d90a7d355c:/$ cd /mnt
root@17d90a7d355c:/mnt$ ls -la
total 0
drwxr-xr-x 2 root root  22 May 29 07:33 .
drwxr-xr-x 1 root root 108 May 29 07:32 ..
-rw-r--r-- 1 root root   0 May 29 07:33 test.txt

I want to store some files in a central location hence the SMB share…in case the container dies or gets wiped.