Skip to content

Commit

Permalink
volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
szabgab committed Mar 16, 2021
1 parent c921300 commit 648da01
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docker/appendix.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,19 @@ $ docker run docker-whale
docker run --mount source=myvol,target=/data --rm -it busybox

```
docker volume ls --format "{{.Driver}} {{.Name}} {{.Mountpoint}}"
docker volume create myvol
Creates /var/lib/docker/volumes/myvol
docker volume ls
docker volume inspect myvol
docker volume inspect myvol # Returns a JSON with information about the volume
docker volume rm myvol
docker-compose up
docker-compose rm
```

## docker system df
Expand Down Expand Up @@ -205,6 +214,9 @@ Build Cache 0 0 0B
--all
--volumes
```

![](examples/volumes/docker-compose.yml)

* [system prune](https://docs.docker.com/engine/reference/commandline/system_prune/)

## Docker history
Expand Down
15 changes: 15 additions & 0 deletions docker/examples/volumes/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3.7'
services:
box:
image: ubuntu:latest
volumes:
- .:/localdir
- my-data:/mydata
entrypoint:
- tail
- -f
- /dev/null


volumes:
my-data:

0 comments on commit 648da01

Please sign in to comment.