Newest 'docker-volume' Questions - Stack Overflow

Questions tagged [docker-volume]

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

0
votes
1answer
17 views

Docker nfs volume mysql - How to fix: “failed to copy file info”

I created a "mysql" service with docker-compose with a nfs volume. The service does not start and gives the following error: "failed to copy file info for /var/lib/docker/volumes/db_data/_data: ...
0
votes
1answer
17 views

mount docker volume destroy files?

I want access /etc/php5/apache2 in my container, where f.e. php.ini is located. As soon as I mount my volume...it seems the container can't write the default php.ini to the apache2 folder, because ...
0
votes
1answer
33 views

docker-compose execute command

I'm trying to put some commands in my docker-compose file to be ran in my container and they don't work. I map a volume from host to container where I have a Root certificate, all I want to do is to ...
2
votes
1answer
19 views

Permissions on Volume files created by Docker

Well I'm running a container which will create/modify some files that I need to persist outside the life-cycle of the container. As a result, I am voluming a folder into the container for that purpose:...
2
votes
2answers
69 views

Why doesn't my docker-compose volume get updated with local file additions?

Here's my docker-compose.yml, it contains a web service, which mounts a folder locally so that upon any code change watchmedo restarts the webapp django server. It's a reverse proxy with nginx. ...
0
votes
0answers
27 views

How to I fill a dockerized MongoDB with local data?

I'm trying to create a dockerized MongoDB with prefilled data. This is the command I use to run the container: sudo docker run -d -p 27017:27017 --network test-bridge --name test-mongo -v ~/db-...
0
votes
0answers
15 views

how to replicate docker volume host machine to another host machine volume--volume high availability host to host

I tried Gluster service in host(cluster machine 1 and machine 2) volume but not supported docker PostgreSQL container data i want to replicate docker volume machine 1 to machine 2 for fail-over ...
0
votes
1answer
29 views

Resolved: How to create a Mongodb docker container without volume

I need to create a snapshot of a MongoDB in a specific state without volume, for auto-testing proposes. To be clear, I need all of the data saved on the container memory and persist, not using a ...
0
votes
0answers
13 views

Issues with firewall mounting C:\ drive in Docker for windows

When I attempt to run docker run --rm -v c:/Users:/data alpine ls /data in a cmd prompt I am met by the message: docker: Error response from daemon: Drive sharing seems blocked by a firewall. See '...
0
votes
1answer
18 views

Persisting a single, static, large Postgres database beyond removal of the db cluster?

I have an application which, for local development, has multiple Docker containers (organized under Docker Compose). One of those containers is a Postgres 10 instance, based on the official postgres:...
0
votes
0answers
24 views

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 ...
0
votes
1answer
47 views

Docker secrets within a docker volume

I am trying to setup a Docker-based Jenkins instance. Essentially, I run the jenkins/jenkins:lts image as a container and mount a data volume to persist the data Jenkins will create. Now, what I ...
0
votes
1answer
12 views

Container content is not being copied to docker host using docker volume

I'm running python script inside container which is generating output.txt file. I want to run this python script just once in container and output.txt should be available in my Docker host, but ...
2
votes
2answers
51 views

How to mount external windows file share inside pod hosted on AWS EKS?

We are looking for viable option to map external windows file share inside kubernetes+AWS-EKS hosted docker containers and few of the options. Windows file share being in same VPN is accessible with ...
0
votes
1answer
49 views

Docker setting entrypoint when attaching volume -v

Previously, I was able to attach a folder on my desktop as a volume in my container like so: docker run -it --rm -v /Users/me/Desktop/Jupyter:/home/jovyan/work -p 8888:8888 jupyter/all-spark-notebook ...
1
vote
3answers
27 views

Does Docker swarm ignore VOLUME commands from Dockerfiles?

We are deploying a stack, the compose file list two services: mediawiki mySQL We saw that the mysql Dockerfile has a VOLUME directive, to persist the databases to a Docker volume Yet, if we docker ...
0
votes
0answers
30 views

Create directory for docker volume

I want to create docker volume and add directory and files into it without creating extra container/images or within minimal time. That thing would go into script, so interactions like -it bash won't ...
0
votes
1answer
50 views

Bind Mount & Volumes: Files do not end up in the container?

I am sweating over a weird problem. I am mounting a folder from the host machine to the container (only for development). The folder is called dj_docker and has a folder dj_docker/media with some .pdf ...
1
vote
2answers
31 views

Where should production critical and non-production non-critical data stored?

I was asked this question in an interview and i m not sure of the correct answer hence I would like your suggestions. I was asked whether we should persist production critical data inside of the ...
0
votes
1answer
91 views

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::/...
0
votes
0answers
21 views

Share content of a container with another on kubernetes

here is what i'm trying to achieve : I have two containers sharing a volume, my first one is a php container, it constains all the file from my project (html, js, whatoever) The second one is a ...
0
votes
1answer
20 views

docker-compose volumes are not mounting properly

I have the following docker-compose file version: '3' services: web: container_name: chatt-friends-api volumes: - .:/usr/src/appDev ports: - 3000:3000 env_file: docker/...
0
votes
1answer
46 views

Persiste apache nifi flow.xml.gz file in docker volume

How can I persist the flow.xml.gz file in nifi docker container? I am using a docker-compose file, it is giving me errors such as not finding certain files. Didi you encounter the same issue? Thanks ...
0
votes
1answer
57 views

Expose log file outside docker container

I have .net core app which Serilog as log framework. Right now Serilog are logging to file. I want to expose this file outside container and have a simple access as with other files. I tried with ...
1
vote
1answer
20 views

Docker volume sporadically mounted too late for file sharing with other containers

I have two containers I run on ECS. One container is an app which shares a config file via a docker volume to a second container which is a Sumologic file collector which is a generic logging ...
2
votes
1answer
22 views

How to share file or directory with other container on ECS?

I have a Sumologic log collector which is a generic log collector. I want the log collector to see logs and a config file from a different container. How do I accomplish this?
1
vote
1answer
191 views

How to manage permissions for a volume mounted into a docker container?

I'm developing a Wordpress theme, and want to use Docker in my dev setup. What I've done is pretty simple: create a database service running MySQL 5.7 create a wordpress service, where I mount my ...
0
votes
1answer
33 views

Lost volume when run docker-compose

I had running container with wordpress and other container with MySQL and its volume (see config below). Then I've run docker-compose up -d --build and then I see wordpress installation page, that ...
1
vote
1answer
71 views

How to specify user owning volume created via docker-compose configuration?

I have the following docker-compose.yml version: '3.7' services: xxx: container_name: xxx image: xxx volumes: - config:/some_mountpoint user: 1000:1000 volumes: config: # &...
0
votes
0answers
39 views

docker-compose volume won't persist data

I am setting a nginx-gunicorn-django-postgres project with docker-compose. I have a container with postgres and I want to make my data persistent. So for example when I do docker-compose ... start/...
0
votes
2answers
31 views

Where to find mounted folders inside a Docker container?

Still pretty wet behind the ears with Docker (and only so-so with Linux); I've fired up a container with a few mounted folders. I know that I can find the volumes at /var/lib/docker/volumes and /mnt/...
0
votes
0answers
21 views

Docker compose: mount on top of mount with different ownership

Short version: Is it possible to have a mount on top of mount with different ownership using Docker and docker-compose? If so how? Long version: I am trying to containerize an existing setup using ...
0
votes
2answers
74 views

Accessing Docker Volume content on MacOS

When I do a docker volume inspect <dockerid> on a Mac, I can see the path to the data, this appears as a /var/lib/docker/volumes/<volume name> On a Mac, this link does not exist, because ...
0
votes
1answer
33 views

Why do some docker files copy files instead of mount them as a volume

Can somebody explain to me why some Dockerfiles have steps to copy files rather than just mount a volume with the files on. I have been looking at the setup for a Django project with Docker and the ...
0
votes
1answer
41 views

Issue with docker swarm and named volumes

I'm having some issues using named volumes in one of my docker stacks. Basically I'm running a bitcoin node developed by bcoin. What I'm trying to achieve is to have the containers running the nodes ...
1
vote
1answer
82 views

Run entire docker container with volumes mounted in memory

I would like to run entire docker container in memory without mapping volumes to host's hard drive. TMPFS described here helps to mount volumes as "memory volumes", but I'm looking a way how to start ...
0
votes
1answer
57 views

Docker bind mount usage

Our application is running on a unix box(let's say box1) on which one nfs filer is mounted on /var/app/data directory. Application writes some text file on the mounted directory /var/app/data. Our ...
1
vote
1answer
56 views

docker re-run automatically when volume map data get changed

I have a spring-boot application running on java images in container. In Dockerfile I am copying jar file. Then build custom image for my project & run it I am thinking what if I will volume-map ...
0
votes
0answers
34 views

How to make a persistent named docker volume with docker-compose version 3 that is given a directory on the host and a container

I have tried to follow the docker-compose reference https://docs.docker.com/compose/compose-file/ But have not been able to get a working example. Currently the closest I can come to making a ...
2
votes
1answer
45 views

Why is my volume not copying over to its docker container?

I am trying to run a webserver container with nginx and a php-fpm server running a Laravel application. The directory houses a frontend and backend directory so my paths are not off in the ...
0
votes
2answers
31 views

What is the use of VOLUME in this official Dockerfile of postgresql

I found the following code in the Dockerfile of official postgresql. https://github.com/docker-library/postgres/blob/master/11/Dockerfile ENV PGDATA /var/lib/postgresql/data RUN mkdir -p "$PGDATA" &...
2
votes
2answers
77 views

Docker apache image, store logs in host?

I use Docker to build an Apache image, and then use docker-compose to run it. I set up Apache access.log and error.log and want to store them outside of the container. currently, I use Volumes but it ...
1
vote
1answer
114 views

Docker for Windows: Accessing named volume mounts

Please note that this is not a duplicate of Locating data volumes in Docker Desktop (Windows) as back in 2017 the inner workings of docker on windows were quite different - e.g. docker volume inspect ...
0
votes
1answer
80 views

Persisting Dockerized Consul KV Store across container runs

Mac OS here running Docker Desktop. I am trying to get the official Consul Docker image to persist its KV store across runs. I am running that image with the following command: docker run -p 8500:...
3
votes
1answer
531 views

docker compose volume type - bind vs volume

My question in short: In docker-compose, whats the difference between volumes: - type: volume source: mydata target: /data and volumes: - type: bind ...
0
votes
0answers
43 views

Docker volume set but code does not update code

I have the following Dockerfile for a django app I am building # base image to be used FROM python:3.6 # The enviroment variable ensures that the python output is set straight # to the terminal with ...
1
vote
2answers
69 views

Docker not persisting postgres volume [django]

There are many questions that have been asked on here about similar issues that I went through such as this, this, this and this that are very similar but none of the solutions there solve my problem. ...
1
vote
0answers
100 views

Docker volume in swarm

Can someone confirm this for me. When running a service in docker with swarm, the docker volume using the local driver will be created on the same node as the running container for a service. If a ...
1
vote
0answers
61 views

Shared folders with GitLab Docker runners

Here's my configuration: I'm using docker gitlab-runners to start docker-compose with the following .gitlab-ci.yml: stages: - run # Official docker compose image. image: name: docker/compose:1....
2
votes
4answers
277 views

Why docker-compose creates directories/files with user:group 999:999?

I used docker-compose up with the following docker-compose.yml version: '3.5' services: mysql-server: image: mysql:5.7 environment: - MYSQL_ROOT_PASSWORD=root_pwd volumes: - ./var/lib/...