Questions tagged [docker-volume]

A docker data volume is a specially-designated directory within one or more containers that bypasses the Union File System.

A docker data volume is a specially-designated directory within one or more containers that bypasses the Union File System. Data volumes provide several useful features for persistent or shared data:

  • Volumes are initialized when a container is created. If the container’s base image contains data at the specified mount point, that existing data is copied into the new volume upon volume initialization.
  • Data volumes can be shared and reused among containers.
  • Changes to a data volume are made directly.
  • Changes to a data volume will not be included when you update an image.
  • Data volumes persist even if the container itself is deleted.

Reference: https://docs.docker.com/engine/userguide/dockervolumes/

1402 questions
9
votes
2 answers

Docker-Compose won't volume my php.ini file

I'm trying to use docker-compose to volume my php.ini file so I can make changes on the fly on my local machine to see how it affects the host machine. Unfortunately the only way I've been able to get the php.ini file into the container is directly…
Joseph Astrahan
  • 8,659
  • 12
  • 83
  • 154
9
votes
1 answer

Docker volume - need permissions to write to database

I'm working on a flask server (in a virtualenv with python 3.5) which is used as a REST API (only for development as suggested for flask). In the beginning it connects to a local sqlite database and it will commit any db changes as soon as possible.…
Chaoste
  • 544
  • 6
  • 17
9
votes
3 answers

How to remove configure volumes in docker images

I use docker run -it -v /xx1 -v /xx2 [image] /bin/bash to create a container. Then commit to image and push to docker hub. use docker inspect [image] The Volumes detail is "Volumes": { "/xx1": {}, "/xx2": {} }, Now I…
Jiacheng-z
  • 93
  • 1
  • 4
9
votes
1 answer

Copy files inside of docker image during build

I want to build a docker image that is based on dockerage/apache-mellon which has a volume on /var/www. I want to build my web app inside the docker container when I'm building it inside a temporary directory and than copy the files to /var/www with…
Oskar Jauch
  • 103
  • 1
  • 1
  • 6
9
votes
1 answer

chown docker volumes on host (possibly through docker-compose)

I have the following example version: '2' services: proxy: container_name: proxy hostname: proxy image: nginx ports: - 80:80 - 443:443 volumes: - proxy_conf:/etc/nginx -…
Morpheu5
  • 2,610
  • 6
  • 39
  • 72
8
votes
0 answers

Docker - failed to mount local volume, no such file or directory

I have a docker-compose that was working for a long time and suddenly stopped. I am getting: failed to mount local volume, no such file or directory This was working for months and started giving the error a few weeks ago. The docker-compose is in…
Don Chambers
  • 3,798
  • 9
  • 33
  • 74
8
votes
3 answers

Where is Kubernetes storage location of a Persistent Volume on Docker Desktop for mac?

I'm not sure if I have a configuration error or I just don't know where to look but I can't seem to find where my files are being stored with these configurations apiVersion: v1 kind: PersistentVolume metadata: name: tmp-storage spec: …
Jason M
  • 1,013
  • 13
  • 25
8
votes
1 answer

Rootless Docker: Permission denied when writing files to volume mount without sudo

I'm unable to write to a mounted volume when in my container (through ssh) without sudo permissions. The mounted folder is host user's home folder at the host. I'm running a rootless docker daemon. I did the following steps to start a…
8
votes
1 answer

Serving an NX monorepo of angular apps in Docker-compose

I have an NX monorepo with 2 apps: Shop Landing I wish to use docker-compose to run my entire environment with eventually some APIs and a database etc etc. I created a docker-file that takes arguments and could be re-used to to run multiple…
Dylan Snel
  • 671
  • 2
  • 7
  • 26
8
votes
4 answers

Docker-compose and mongoDB: Failed to start up WiredTiger under any compatibility version?

I have the following docker-compose file: version: "3" services: # # APIs #---------------------------------------------- pokerstats: image: pokerstats container_name: pokerstats ports: -…
java12399900
  • 1,485
  • 7
  • 26
  • 56
8
votes
1 answer

Difference between -volume and -volumes-from in Docker Volumes

What is the exact difference between the two flags used in docker volume commands -v and --volumes-from. It seems to me that they are doing the same work, consider the following scenario. First lets create a volume named myvol using command: $…
Haseeb Anwar
  • 2,438
  • 19
  • 22
8
votes
2 answers

docker volume ls lists empty

I'm using docker version 18.09.2, build 6247962. I run a container and mounted a host directory to the container. docker run -it -p 4444:8000 -v c:/py:/azima 27b4b21eeb64 /bin/sh This created a container and the host directory c:/py has been…
Azima
  • 3,835
  • 15
  • 49
  • 95
8
votes
1 answer

Persistent storage on Elastic Beanstalk Docker Container

I'm looking for some way to mount a S3 Storage Bucket (for example) as Docker volume in an Elastic Beanstalk Docker Container. Since i can't change the application code, i have to configure that part in the Dockerrun.aws.json file using Docker…
8
votes
1 answer

How /var/run/docker.sock works for windows Docker?

I have Docker installed on my Windows OS. There is my volumes filed of docker-compose.yml: volumes: - "/var/run/docker.sock:/var/run/docker.sock" I just can't figure out how /var/run/docker.sock::/var/run/docker.sock path works for windows as I…
8
votes
3 answers

Create docker volume with limited size

There is is very limited information regarding create volume with options "https://docs.docker.com/engine/reference/commandline/volume_create/ ". I just want to create a volume with limited size, I tried, docker volume create --opt o=size=10m…
batilei
  • 401
  • 3
  • 6
  • 16