docker_practice/image/dockerfile/volume.md

21 lines
1.1 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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