Docker Community Forums

Share and learn in the Docker community.

Windows bind mounts are mounting as if they are empty


(Jaebae) #1

Hey all! New to docker here and I’m trying to get some persistent storage set up for a test PlexPy container for windows. I’m on Windows Server 2016 with Docker EE installed, here is how I’m mounting:

docker run -d -p 47477:8181 -v vol_plexpy:c:/data mediaserver-plexpy

What’s happening is the volume is being created and we are writing to the volume successfully. However, when we restart or stop the container the container starts up and doesn’t recognize any of the existing content in the mount. It overwrites the data so I’m not sure if this is a permission issue or a bug.

I’ve also tried using --mount with an absolute path:

docker run -d -p 47477:8181 --mount type=bind,source=C:/ProgramData/docker/volumes/vol_plexpy,target=c:/data mediaserver-plexpy

But the same thing happens! I’m greeted by a setup screen because it doesn’t recognize the existing configuration files each time it boots up.

Am I doing something wrong here? How can I get this to work properly?


# Use an official Python runtime as a parent image
FROM python:2.7

VOLUME c:/data

# Set the working directory to /app

# Copy the current directory contents into the container at /app
COPY ./plexpy/ /app

# Make port 80 available to the world outside this container

# Define environment variable

# Run when the container launches
CMD ["python", "", "--config c:/data/", "--datadir c:/data/", "--nolaunch"]

> docker info

PS C:\docker\build\dev\plexpy> docker info
Containers: 2
 Running: 1
 Paused: 0
 Stopped: 1
Images: 16
Server Version: 17.06.2-ee-5
Storage Driver: windowsfilter
Logging Driver: json-file
 Volume: local
 Network: l2bridge l2tunnel nat null overlay transparent
 Log: awslogs etwlogs fluentd json-file logentries splunk syslog
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.1794.amd64fre.rs1_release.171008-1615)
Operating System: Windows Server 2016 Standard Evaluation
OSType: windows
Architecture: x86_64
CPUs: 16
Total Memory: 15.93GiB
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Experimental: false
Insecure Registries:
Live Restore Enabled: false

(Jaebae) #2

Any ideas? I’m at a complete loss on this after reading documentation. This should be working according to everything that I’ve read.