docker_practice/image/dockerfile/volume.md

21 lines
1.1 KiB
Go
Raw Permalink Normal View History

# VOLUME
* `VOLUME ["<路径1>", "<路径2>"...]`
* `VOLUME <路径>`
(volume) Docker `Dockerfile`
```docker
VOLUME /data
```
2021-03-11 23:09:37 +08:00
`/data` `/data`
```bash
2021-03-11 23:09:37 +08:00
$ docker run -d -v mydata:/data xxxx
```
使 `mydata` `/data` `Dockerfile`