Bind mount volume with tos folder

Discussion about Docker
Locked
Roccia7
Posts: 62
Joined: 05 Mar 2020, 05:02
Italy

Bind mount volume with tos folder

Post by Roccia7 »

Hello, i'm trying to bind my tos folder with docker's volume folder. I tried this https://docs.docker.com/storage/bind-mo ... t-behavior and this https://4sysops.com/archives/introducti ... d-volumes/
But don't know why i can't bind the folder. Somebody can help me please?
Thanks in advance
TNAS F2-220
TOS 5.0.176
User avatar
TMSupport
TerraMaster Team
Posts: 2314
Joined: 13 Dec 2019, 15:15

Re: Bind mount volume with tos folder

Post by TMSupport »

Bind TOS folder with docker's volume folder:
[root@TNAS-001DCF nginx]# docker run -itd --name nginx01 -p 8080:80 --mount type=bind,src=/mnt/nginx,dst=/usr/share/nginx/html nginx
#Using nginx image.The src parameter is the tos folder;
[root@TNAS-001DCF nginx]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f6903f0d97da nginx "nginx -g 'daemon ..." 5 seconds ago Up 3 seconds 0.0.0.0:8080->80/tcp nginx01
#nginx is start
[root@TNAS-001DCF nginx]# docker exec -it f6903f0d97da bash
#Enter the nginx container and execute the command
root@f6903f0d97da:/# touch /usr/share/nginx/html/index.html
root@f6903f0d97da:/usr/share/nginx/html# echo 'TerraMaster' >index.html
Image
root@f6903f0d97da:exit
[root@TNAS-001DCF nginx]# cat /mnt/nginx/index.html
TerraMaster
[root@TNAS-001DCF nginx]# It's OK.
Image
Attachments
20200319111052.png
20200319111052.png (11.65 KiB) Viewed 5443 times
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
TMSupport
TerraMaster Team
Posts: 2314
Joined: 13 Dec 2019, 15:15

Re: Bind mount volume with tos folder

Post by TMSupport »

Image
Attachments
20200319111125.png
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
Locked