docker_practice/image/dockerfile/volume.md

21 lines
1.1 KiB
Go
Raw Normal View History

### VOLUME
* `VOLUME ["<路径1>", "<路径2>"...]`
* `VOLUME <路径>`
(volume) Docker `Dockerfile`
```Dockerfile
VOLUME /data
```
`/data` `/data`
```bash
docker run -d -v mydata:/data xxxx
```
使 `mydata` `/data` `Dockerfile`