Last active
July 24, 2018 14:16
-
-
Save aereal/84cb7d02cae45b0c45fee5c7177deff6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM buildpack-deps:jessie | |
| RUN mkdir -p /app/data && touch /app/data/PROCESS-$(date +%s) | |
| CMD ["ls", "/app/data"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ✘╹◡╹✘ < docker build -t voltest:latest . | |
| Sending build context to Docker daemon 3.072kB | |
| Step 1/3 : FROM buildpack-deps:jessie | |
| ---> a00998d35d0b | |
| Step 2/3 : RUN mkdir -p /app/data && touch /app/data/PROCESS-$(date +%s) | |
| ---> Using cache | |
| ---> 10a29dbd69e2 | |
| Step 3/3 : CMD ["ls", "/app/data"] | |
| ---> Using cache | |
| ---> 7fe95c074e78 | |
| Successfully built 7fe95c074e78 | |
| Successfully tagged voltest:latest | |
| ✘╹◡╹✘ < docker run --rm -v /app/data voltest:latest | |
| PROCESS-1532440436 | |
| ✘╹◡╹✘ < docker run --rm -v $PWD/data:/app/data voltest:latest | |
| ✘╹◡╹✘ < docker volume ls | |
| DRIVER VOLUME NAME | |
| local data | |
| ✘╹◡╹✘ < docker volume inspect data | |
| [ | |
| { | |
| "CreatedAt": "2018-07-24T14:04:13Z", | |
| "Driver": "local", | |
| "Labels": null, | |
| "Mountpoint": "/var/lib/docker/volumes/data/_data", | |
| "Name": "data", | |
| "Options": {}, | |
| "Scope": "local" | |
| } | |
| ] | |
| ✘╹◡╹✘ < docker run --name voltest-run --rm -v $PWD/data:/app/data voltest:latest sleep 100000 | |
| ✘╹◡╹✘ < docker inspect voltest-run | jq '.[].Mounts' | |
| [ | |
| { | |
| "Type": "bind", | |
| "Source": "/Users/aereal/docker-volumes-test/data", | |
| "Destination": "/app/data", | |
| "Mode": "", | |
| "RW": true, | |
| "Propagation": "rprivate" | |
| } | |
| ] | |
| ✘>﹏<✘ < docker run --name voltest-run --rm -v /app/data voltest:latest sleep 100000 | |
| ✘╹◡╹✘ < docker inspect voltest-run | jq '.[].Mounts' | |
| [ | |
| { | |
| "Type": "volume", | |
| "Name": "58c5afe073edac995fd0a121f15460224f0902cff234aaa5efc160e213999032", | |
| "Source": "/var/lib/docker/volumes/58c5afe073edac995fd0a121f15460224f0902cff234aaa5efc160e213999032/_data", | |
| "Destination": "/app/data", | |
| "Driver": "local", | |
| "Mode": "", | |
| "RW": true, | |
| "Propagation": "" | |
| } | |
| ] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment