mirror of https://github.com/docker/docs.git
Update tmpfs mounts example (#15817)
* Update "Mounts" example In the original example, the "Mounts" field returned by `docker container inspect [CONTAINER]` was not shown. This may be too much data, but we should at least show the "Mounts" field so folks know what to look for. * shortened the docker inspect example Co-authored-by: David Karlsson <david.karlsson@docker.com>
This commit is contained in:
parent
9c97e896ab
commit
88fb637b8a
|
|
@ -94,21 +94,19 @@ $ docker run -d \
|
|||
</div><!--volume-->
|
||||
</div><!--tab-content-->
|
||||
|
||||
Verify that the mount is a `tmpfs` mount by running `docker container inspect
|
||||
tmptest` and looking for the `Mounts` section:
|
||||
|
||||
```json
|
||||
"Tmpfs": {
|
||||
"/app": ""
|
||||
},
|
||||
```
|
||||
|
||||
Remove the container:
|
||||
Verify that the mount is a `tmpfs` mount by looking in the `Mounts` section of
|
||||
the `docker inspect` output:
|
||||
|
||||
```console
|
||||
$ docker container stop tmptest
|
||||
$ docker inspect tmptest --format '{{ json .Mounts }}'
|
||||
[{"Type":"tmpfs","Source":"","Destination":"/app","Mode":"","RW":true,"Propagation":""}]
|
||||
```
|
||||
|
||||
$ docker container rm tmptest
|
||||
Stop and remove the container:
|
||||
|
||||
```console
|
||||
$ docker stop tmptest
|
||||
$ docker rm tmptest
|
||||
```
|
||||
|
||||
### Specify tmpfs options
|
||||
|
|
@ -137,4 +135,4 @@ docker run -d \
|
|||
|
||||
- Learn about [volumes](volumes.md)
|
||||
- Learn about [bind mounts](bind-mounts.md)
|
||||
- Learn about [storage drivers](/storage/storagedriver/)
|
||||
- Learn about [storage drivers](/storage/storagedriver/)
|
||||
|
|
|
|||
Loading…
Reference in New Issue