New to docker and starting out with a few containers. Thought I would try out Plex. I have Docker running on a Dell R210II. I have Plex installed and running in Docker, but need to mount a synology NAS to access the movies/music there. Is there a good resource on how to do this?
Mount the NAS on the host and bind-mount the mounted folder to the container… Or use NFS volume:
The example is for Docker Swarm but you could do the same with docker run.
docker run -d \
--mount 'type=volume,src=<VOLUME-NAME>,dst=<CONTAINER-PATH>,volume-driver=local,volume-opt=type=nfs,volume-opt=device=<nfs-server>:<nfs-path>,"volume-opt=o=addr=<nfs-address>,vers=4,soft,timeo=180,bg,tcp,rw"'
--name mycontainer \
<IMAGE>
I don’t have NFS drive to try so I just copied the swarm example and replaced “service create” with “run”