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/

1047 questions
-1
votes
2 answers

Should `docker run` be avoided, to execute an image created with `docker-compose`?

I've checked on SO but couldn't find a exhaustive answer. My docker-composer.yml defines few things including volumes app: volumes: - "./:/app" ... If I use docker run to instance the image, then I will need to specify again the…
Kamafeather
  • 5,651
  • 10
  • 44
  • 74
-1
votes
2 answers

how to remove file from folder and subfolder single command linux

How to delete file from folder and subfolder currently using below command for delete logs but i want delete logs file in folder and subfolder in Linux . currently i am doing enter every folder and delete log for specific year. is there any command…
-1
votes
1 answer

Docker Volume Permissions with Apache httpd.conf file

Working on learning linux, Docker, and Docker Volumes. I want to spin up an httpd container that references a httpd.conf file on my local machine that has proxy and load balancing code in it with the correct modules loaded. I've gotten it figured…
-1
votes
1 answer

ubuntu 16.04: docker not syncing its directory with the host's directory

I am trying to run a docker container. This docker container contains a set of files inside a directory /mnt. I want this directory to be automatically copied to the host's machine /mnt directory, upon the creation of the container, and anything…
Nicolas El Khoury
  • 3,421
  • 3
  • 14
  • 19
-1
votes
3 answers

Docker mount an directory of container to another container

I have an container Container-A which has directory /opt/test/data which contains files which get created during building image. Now I want to share /opt/test/data(container-a directory) to Container-B as it requires to use those files during its…
Abhinav
  • 825
  • 2
  • 12
  • 29
-1
votes
1 answer

Docker volume persistent

I have two questions about docker volume. First : When I run my docker with a volume which it creates with docker volume create or with docker-compose, new files on the default directory are not appended to the volume. I give an example : docker…
-1
votes
1 answer

Why is docker volume create and rm not symmetrical?

Docker volume create works like this: docker volume create --name v1 v1 Docker volume remove works like this: docker volume rm v1 v1 So why does docker volume create need the --name parameter?
Ole
  • 29,797
  • 32
  • 110
  • 232
-2
votes
2 answers

What is container path in docker?

I'm trying to read a file from the host to the container which is python script. That script reads a file from the root folder. For eg /a/b/c/log.txt(This is a dynamic file so I cant add this into Dockerfile) I need to access this in the docker…
-2
votes
1 answer

Backup docker volume on a broken system. Volume recovery

I have a server that's been running in docker on coreos. For some reason containerd has stopped running and the docker daemon has stopped working correctly. My efforts to debug haven't gotten far. I'd like to just boot a new instance and migrate,…
-2
votes
1 answer

Kubernetes - How to use files from a directory in a pod?

I have a builder image / container which is supposed to run tests on a directory with tests sources. The container is run in a Kubernetes pod, in AWS EKS, through helm test. I.e. not docker, so I can't simply use -v volume mount. I am struggling to…
Ondra Žižka
  • 36,997
  • 35
  • 184
  • 250
-3
votes
1 answer

Why Docker mounts only specific files in volume?

$ sw_vers ProductName: Mac OS X ProductVersion: 10.13.6 BuildVersion: 17G65 $ docker -v Docker version 18.06.0-ce, build 0ffa825 I have some docker-compose file that actually has this string of line: volumes: - .:/sql And In "."…
Michael A.
  • 642
  • 7
  • 14
-4
votes
1 answer

docker nginx Mount -v

docker run command error: (I was knocking on the document command, Docker version 18.03.0-ce), ask why? docker run -p 80:80 --name mynginx -v $PWD/www:/www -v $PWD/conf/nginx.conf:/etc/nginx/nginx.conf -v $PWD/logs:/wwwlogs -d nginx The error…
1 2 3
69
70