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
Bind mount volume with tos folder
Bind mount volume with tos folder
TNAS F2-220
TOS 5.0.176
TOS 5.0.176
Re: Bind mount volume with tos folder
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
root@f6903f0d97da:exit
[root@TNAS-001DCF nginx]# cat /mnt/nginx/index.html
TerraMaster
[root@TNAS-001DCF nginx]# It's OK.
[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
root@f6903f0d97da:exit
[root@TNAS-001DCF nginx]# cat /mnt/nginx/index.html
TerraMaster
[root@TNAS-001DCF nginx]# It's OK.
- Attachments
-
- 20200319111052.png (11.65 KiB) Viewed 5473 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)
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
Re: Bind mount volume with tos folder
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)
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)