Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 612 Bytes

demo-07.md

File metadata and controls

31 lines (25 loc) · 612 Bytes

Docker Demo 7

Volume Demo

NOTE : You must allow Docker Desktop to Access Drive "D" through Advanced Settings.

On Docker Desktop

$ d:
$ mkdir demo
$ cd demo
$ notepad index.html
$ docker run -p 8080:80 -d --name e4 -v d:\demo:/usr/share/nginx/html:ro nginx:1.13.0
$ curl localhost:8080
$ docker stop e4
$ docker rm e4

On Docker Playground

$ mkdir demo
$ cd demo
$ touch index.html
### Use "Editor" to add HTML inside index.html
$ docker run -p 8080:80 -d --name e4 -v /root/demo:/usr/share/nginx/html:ro nginx:1.13.0
$ curl localhost:8080
$ docker stop e4
$ docker rm e4