Questions tagged [docker-volume]
A docker data volume is a specially-designated directory within one or more containers that bypasses the Union File System.
1,238
questions
0
votes
1
answer
40
views
How can I use a bind mount in docker-compose and still preserve node_modules?
I am trying to build and run an image based on this docker course. The goal is to have a bind mount that allows me to sync source code changes with the running container, but also to preserve the ...
0
votes
0
answers
32
views
Why are my postgres user and volume not created by docker-compose?
I am having trouble composing a docker running postgres. I cannot get it to create the user postgres, nor do I see the volume I specify. I had this working before, I didn't think I changed anything, ...
2
votes
0
answers
13
views
docker privileged container giving storage full error
I have a CentOS 7 docker container that has an apache browser running as "systemd service" (Yes it's a privileged container). After a few days, the apache service stops running in the ...
0
votes
1
answer
33
views
create volume in docker compose base on client directory path
I want to use a local folder for example dataset in my docker container. Also I have a python request module in which client send to API server a directory path. I want to use this path in docker ...
0
votes
1
answer
24
views
Unable to mount a volume in Azure Container App
I have been trying to build and deploy a Docker image of the nopCommerce website to the new-ish Azure Container Apps service.
I have had some success in building the container in Azure DevOps to an ...
0
votes
1
answer
40
views
Why do I still getting error, Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock?
I have installed docker inside my EC2 instance and running Jenkins as a docker container. The complete code is given below.
sudo su
apt-get update
apt install -y docker.io
service docker start
...
0
votes
0
answers
23
views
Option -o in driver_opts in Docker-compose.yml file
I have a specific question :
Can someone explain me what is the option 'o' (usually used with 'bind' value) in driver_opts section of a volume in a docker-compose file ?
I searched on the Internet but ...
0
votes
0
answers
18
views
Persist mongodb data in docker volume
I am new to docker and I am trying to persist the data I insert in my mongodb container. After a few google searches I found out that I need to create a volume where the container data will be ...
0
votes
0
answers
23
views
docker-compose update error with volume mapped on host and 2 containers
I have a docker-compose file that works when I start it from scratch (no docker running) if I start it again with an updated images, it creates an error with a volume which is mapped on the host and ...
0
votes
0
answers
23
views
Does docker volume substitute copied files?
Minimal reproducible. If you run docker-compose up as is (with volume commented out), everything works. Comment in the volume in docker-compose.yaml and rebuild, I get sh: webpack: not found. What is ...
0
votes
2
answers
39
views
Why do I need to specify volumes twice?
I've read this post and this one. And the best explanation I've found is:
... outside you declare the volume and inside you specify how to mount it into a container. A volume has an independent life ...
3
votes
1
answer
44
views
Minimize `docker build` execution time inside Docker-in-Docker containers
The use case:
We have several "Release jobs" in Jenkins that build and push a Docker image of the application to a docker registry, update the project version in various files and finally ...
-1
votes
0
answers
14
views
Save downloaded files in aws elastic file system from docker container
I have a dockerized spring boot application running on EC2. An Elastic File System is mounted with my EC2. I am trying to save downloaded files and the files are saving in docker vm file system, i ...
0
votes
0
answers
25
views
How to migrate data between named volumes?
I want to migrate data from an old_volume volume to a new new_volume volume. I want to move data from a local volume to a storage volume.
The old_volume is a named volume that uses the default Docker ...
0
votes
1
answer
104
views
Docker-compose volume not storing files
I'm having trouble demonstrating that data I generate on a shared volume is persistent, and I can't figure out why. I have a very simple docker-compose file:
version: "3.9"
# Define network
...
0
votes
1
answer
49
views
MariaDB volume lose records when re-starting Docker containers
I'm having a Laravel app running on Docker and I have Breeze installed. This is my setup
This is my docker-compose.yml file
version: "3.8"
services:
web:
container_name: apache
...
0
votes
0
answers
28
views
Cannot find files after changing named volumes to bind mounts - blitz.js, elasticsearch, docker
I'm working on a blitz.js project that uses postgres, mongodb, elasticsearch, redis images. We have a docker-compose for setting those up for dev purposes (we're starting the application locally, ...
1
vote
2
answers
47
views
Issue with docker permissions
I just learning about docker Volumes.
I have this code aside Node.js project.
this is my Docker file:
FROM node:14
WORKDIR /app
COPY package.json .
RUN npm install
COPY . .
EXPOSE 80
VOLUME [ &...
0
votes
2
answers
54
views
How to serve static files saved in a docker volume with FastAPI?
I've created two volumes, t21db for my SQLite DB and t21images for my images, in my FastAPI app im using app.mount to mount the location for the volume to retrieve the images, here's the code -
app = ...
0
votes
0
answers
77
views
Docker Superset Volumes - how to persist information
I have two docker-compose files. In one is mariadb in another superset
mariadb:
version: '2.4'
services:
mariadb:
container_name: mariadb
image: mariadb
restart: always
volumes:
...
0
votes
1
answer
58
views
Docker is not copying file on a shared volume during build
I would like to have the files created on the building phase stored on my local machine
I have this Dockerfile
FROM node:17-alpine as builder
WORKDIR '/app'
COPY ./package.json ./
RUN npm install
...
-1
votes
1
answer
26
views
How to access the file generated inside docker container by defining the volume in docker-compose.yml file
I am rookie when it comes to docker container , can somebody help me here.
There is a project which generates a output files when running inside docker container , I need to add Volume inside docker-...
1
vote
0
answers
35
views
Best solution to Deploy docker with volumes
I am new to Docker. I have created a docker image with Java, Node , Git config etc and deployed locally with 3 Volumes and I can see that running perfectly fine in Docker Desktop.
I am not able to ...
0
votes
1
answer
173
views
Unable to bring up prometheus using docker-compose file. Always throws the error /etc/prometheus/prometheus.yaml: no such file or directory
I have been trying to bring up a Prometheus container using docker-compose file. I have looked into the various solutions available online and none of them seem to work. Please go through my ...
0
votes
0
answers
30
views
Docker - Storing logs, files to host machine only
I am new to Docker.
I did read through the documentation.
Regarding 'volume' configuration, my understanding is data is stored with in the container as well as in host machine. I see the data is in ...
1
vote
3
answers
85
views
Container not writing data to physical disk file
Python Code:
import datetime,os
data = ""
with open("D://PythonService//Test.txt", "w") as outFile:
outFile.write(data + "Service started at - {}\n".format(...
0
votes
0
answers
77
views
mkdir(): Permission denied error in php docker nginx
Im getting mkdir(): Permission denied error in dockerised php.
I need to create folder dynamically inside /app ,
tried with mkdir('/app/images/' 0777, true)
chown for particular folder is www-data:www-...
0
votes
0
answers
55
views
Map the docker compose volume from container to host is not working
I have a very simple nextjs application where I have two folders which I like to map to the host (developer system) while I deploy this application inside docker (I use docker-desktop).
Data folder (...
0
votes
1
answer
41
views
Excluding a folder when mounting a Docker volume is not working using the syntax for Docker 3
I’m trying to build a Rails container, but exclude the “.bundle” directory when the volume is mounted. Locally I have this content
$ cat .bundle/config
---
BUNDLE_JOBS: "4"
...
1
vote
1
answer
41
views
Default volumes created while running mongodb images
I am trying to run mongodb using docker-compose.
Every time I restart the containers, I see that mongo creates default volumes with random names and the number of volume grows.
Why these volumes are ...
0
votes
2
answers
99
views
Binding a local directory to java application container
Hello I'm a beginner to docker.
I'm saving my output file in the current directory using the java code as follows :
File currDir = new File(".");
String path = currDir.getAbsolutePath();
...
0
votes
1
answer
101
views
Custom DNS record and SSL certificate in docker container
I am facing a issue with self signed certificate and DNS record in hosts file inside docker container. We have multiple Linux servers with docker swarm running. There was a docker service where I need ...
0
votes
0
answers
53
views
Docker-compose volume permission
I am new to Docker and still learning.
I have a problem now, which drives me crazy as I am unable to figure out a pretty way to solve this for quite some time already.
So I have a very simple and ...
0
votes
0
answers
29
views
Docker bind mount a folder on removable device not writing files
I am having issues writing files to a bing mount on a docker container when the host path is located on an external drive. I can still see the files inside the container, but nothing is written on the ...
1
vote
1
answer
75
views
gitlab - trying to upload files from shared docker volume as artifacts
I'm trying to upload files from a container as artifacts in my gitlab pipeline. I'm trying to create a shared volume. But I must be doing something wrong because I'm getting an error that there are ...
0
votes
0
answers
20
views
How can I modify the access right (on host) of files created within a docker container inside the volume folder?
I am creating a docker container, from an image.
In the shell script, I create a volume folder in container and host.
However, when I create a test file, for example, on the container side, I cannot ...
0
votes
1
answer
103
views
Docker Swarm Persist DB Data
I've seen variations of this question but for some reason I think I'm missing something.
Problem
I'm running a couple of containers on docker swarm. Every time my DB container, or backend container ...
4
votes
2
answers
414
views
Allow Docker Container & Host User To Write on Bind Mounted Host Directory
Any help from any source is appreciated.
Server has a Docker container with alpine, nginx, php. This container is able to write in bind mounted host directory, only when I set "chown -R nobody ...
0
votes
1
answer
59
views
Docker writes data not only in volume
Here is my setup:
4 Services: Worker, Database (Postgis), Rest-API and a Mapserver
1 Volume for the Database
docker volume inspect pgdata
[
{
"CreatedAt": "0001-01-01T00:00:...
0
votes
1
answer
170
views
How to remove mounted Docker volume directory on host without root permissions
I have the following problem.
I unintentionally mounted a Docker volume on a host machine on which I don't have root permissions. Now, I get a 'Permission denied' error while trying to delete the ...
0
votes
1
answer
88
views
Passing folder as argument to a Docker container with the help of volumes
I have a python script that takes two arguments -input and -output and they are both directory paths. I would like to know first if this is a recommended use case of docker, and I would like to know ...
0
votes
1
answer
82
views
DDEV/docker-compose: Bind-mount a path with an absolute path
I'm trying to define a volume in ddev like this:
Filename: docker-compose.salesforce.yaml
Contents:
version: '3.6'
services:
web:
volumes:
- /Users/dmgig/JWT:/home/dmgig/JWT:rw
But as you ...
1
vote
2
answers
126
views
how to share docker container volume with other team members
I have a container with postgres ( for dev purposes), on that container i did some manual changes over the database that i wish to share with other team members,
the following yml file is committed to ...
0
votes
0
answers
40
views
Have node_modules in host
I have a NuxtJS project (which obviously contains a node_modules directory) running on Docker.
The main subject is that I don't want to install npm on my host (dev) machine. I want my container to npm ...
1
vote
0
answers
139
views
JupyterHub custom DockerSpawner to bind different shared volumes based on LDAP group membership
Users and groups are managed by LDAPAuthenticator.
c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator'
c.LDAPAuthenticator.allowed_groups = [...]
....
DockerSpawner is currently ...
0
votes
0
answers
86
views
Unable to upload images. Ghost CMS in Docker
When upload any images (post, logo and etc.), printing the error "Request was rejected due to server error".
Container reloaded per try to upload, without any errors in "docker logs&...
0
votes
1
answer
80
views
Why my mongodb docker not writing data to host folder using volume?
I want to know why my mongo docker not writing data to local foler. I run my mongo docker with this command:
(/data/db seems to be the mongdo docker's data storage position, and /data/docker/...
0
votes
1
answer
209
views
Driver options for Docker cloudstor azure plugin?
I'm quite new to docker plugins feature. I managed to build container for my django app with compose file.
version: '3.8'
services:
app:
build:
context: .
container_name: app
...
0
votes
1
answer
258
views
How to volume mount files from one docker container into another container? [duplicate]
Currently i have web application which is running inside docker. This docker container(ContainerA) would dynamically create YAML files based on the input given from UI.
Now, ContainerA would start the ...
0
votes
0
answers
511
views
docker-compose volumes mount to nas-folder (nfs)
i have a problem with my docker-compose file.
i get a error while bringing up the project after docker-compose up.
i have a synology nas with an network share. smb and nfs is enabled.
from my pc, i ...