meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:docker [2018/11/07 09:53] – [Issues] niziak | linux:docker [2020/05/07 09:05] (current) – niziak | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Docker ====== | ||
| * **Docker image** - operating system with preconfigured application (service) | * **Docker image** - operating system with preconfigured application (service) | ||
| Line 30: | Line 31: | ||
| -v, --volume=[] | -v, --volume=[] | ||
| </ | </ | ||
| + | |||
| + | How to run multiple shell commands in docker at once: | ||
| + | <code bash> | ||
| Line 76: | Line 80: | ||
| * https:// | * https:// | ||
| - | ====== Volumes ====== | ||
| - | [[https:// | ||
| - | |||
| - | Data volumes are designed to persist data, independent of the container’s life cycle. Docker therefore never automatically delete volumes when you remove a container, nor will it “garbage collect” | ||
| - | A Docker data volume persists after a container is deleted. | ||
| - | |||
| - | Volumes types: | ||
| - | * local storage (original image data located in specified directory | ||
| - | * bind-mounted host (original image data are **not copied**) | ||
| - | * volume plugins | ||
| - | |||
| - | ===== BTRFS Volume plugin for Docker ===== | ||
| - | [[https:// | ||
| - | |||
| - | |||
| - | Volume destination inside container must be a absolute path. | ||
| - | |||
| - | Run shell with mounted volume from another docker: | ||
| - | <code bash> | ||
| - | <code bash> | ||
| - | |||
| - | Single file can be mounted as volume: | ||
| - | <code bash> | ||
| - | |||
| - | Create named volume and share it between multiple containers: | ||
| - | <code bash> | ||
| - | docker run -d -P -v my-named-volume:/ | ||
| - | docker run -d -P -v my-named-volume:/ | ||
| - | docker run -d -P -v my-named-volume:/ | ||
| - | </ | ||
| - | |||
| - | To protect data from being deleted with volume use '' | ||
| - | |||
| - | Find orphaned volumes | ||
| - | <code bash> | ||
| - | docker volume ls -f dangling=true | ||
| - | docker volume rm <volume name> | ||
| - | </ | ||
| - | |||
| - | Transfer volume to another host [[https:// | ||
| - | |||
| - | [[https:// | ||
| - | |||
| - | ====== Network ====== | ||
| - | |||
| - | [[http:// | ||
| - | [[http:// | ||
| - | |||
| - | ====== data persistence in swarm ====== | ||
| - | [[http:// | ||
| - | [[https:// | ||
| ====== Backup ====== | ====== Backup ====== | ||