docker volumes
source link: https://xmetal.cc/?p=2062
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
volumes
volumes 有两种形式
1 宿主机路径(HOST:CONTAINER)
volumes:
- ~/configs:/etc/configs/:ro #host:container
2 数据卷名称(VOLUME:CONTAINER)
匿名卷即没有显示指定名字的卷,实名卷具有名字,两种卷均存储在/var/lib/docker/volumes/区域,匿名卷的目录名是一串数字,如果在创建容器是添加了-rm参数,则匿名卷会随着容器的删除而删除
volumes:
- /var/lib/mysql #匿名
- db:/var/lib/mysql #VOLUME:container
Post navigation
Leave a Reply Cancel reply
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Website
Recommend
-
39
Pump up the Volumes: Data in Docker Part 6 of Learn Enough Docker to be Useful Jeff Hale ...
-
8
A Docker Cheat Sheet Introduction Docker makes it easy to wrap your applications and services in containers so you can run them anywhere. As you work with Docker, however, it’s also easy to accumulate an excessive number o...
-
8
How to Implement Docker Swarm with PostgreSQL and Web-Services on Nutanix ACS Shared Volumes 08/22/2016 In my previous article we deployed an open-source PACS solution on Nutanix using Acropolis...
-
5
1. Para que serve o volume no Docker ? Basicamente utilizamos o volume para fazer a persistência de dados entre nossa máquina e o container. 2. Tipos de Volume Bind-mount Volume / Vol...
-
9
docker-compose-volumes的说明 - 张占岭 - 博客园 敢于对过去告一个段落,才有信心掀开新的篇章! 关注:架构设计、领域驱动、统一认证、微服务、分布式、容器编排、持续集成、自动化测试、设...
-
6
How to Store Docker Container Data In Docker Volumes One option for automating a container with data is to store the data within the container image. However, this requires a copy of the data to be in each container you run, which c...
-
4
Comments As a non-programmer with a user that is in the docker usergroup
-
5
Docker - How to cleanup (unused) resources Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ... delete volumes // see: https://github.com/chadoe/docker-cleanup-vol...
-
0
Understanding Docker VolumesLet us understand data persistence in Dockers using examples to create, backup, migrate, and restore Docker Volumes.
-
3
Why Volumes? In my last article, I showed how to create a Docker image and a container based on that image. One nice thing about container...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK