Questions tagged docker-volume

Explore the latest questions and answers asked by our top developers.

Is there a way to mount all the files from directory to container directory without deleting its content?

To be more specific I like to mount configuration files to conf directory in Tomcat 9. The idea behind this is to let the files to be changed in run time and to save the down&up time of the container. The idea is to generate container with this dir: /MyTomcat/conf and the docker-compose file will […]

By Lupidon
Published
Categorised as docker, docker-compose, docker-volume Tagged , ,

Empty node_modules folder appears when using volume bindings in docker-compose

To containerize React application I’ve created Dockerfile.frontend & docker-compose.yml with the following contents: Dockerfile.frontend: FROM node:16 WORKDIR /usr/src/app COPY package*.json ./ RUN npm install; # NOTE: Something change in Node v.16 and after ‘npm install’ # it throws out the error "EACCES: permission denied, # mkdir ‘/usr/app/node_modules/.cache’". Changing ownership # of /node_modules folder solves the […]

By Evgen
Published
Categorised as docker, docker-compose, docker-volume, node.js Tagged , , ,

Questions related to Docker volume

Please how do I determine the container id or image name of an unknown docker volume? For example I was able to find the list of docker volumes by running the command ‘docker volume ls’ but unfortunately when I was building some of the images I didn’t mount a specific volume so most of my […]

Docker bind mount error "is not a shared mount"

I am trying to mount a FUSE virtual filesystem from inside a Docker container and expose the mount point to the host. Docker is installed via snap on Ubuntu 20.04 The software is a fresh install of Seafile (a Dropbox alternative), but this problem I believe is more related to Docker, snap, and mounting file […]

Docker bind propagation mount error "is not a shared mount"

I am trying to mount a FUSE virtual filesystem from inside a Docker container and expose the mount point to the host. Docker is installed via snap on Ubuntu 20.04 The software is a fresh install of Seafile (a Dropbox alternative), but this problem I believe is more related to Docker, snap, and mounting file […]

dockered mariadb "[1045] Access denied for user" inside docker network

I know that this question has a lot answers on stackoverflow but I didn’t found a solution for my case! I moving the Laravel app to the containers. I CAN CONNECT TO MARIADB INSTANCE OUTSIDE THE DOCKER NETWORK BUT NOT INSIDE! (I can connect via MySQL Workbench, locally (via docker exec), I can restore the […]

Docker with python to copy file specified, unzip and do actions

Setup Project src main.py Dockerfile Dockerfile (raw, needs to be revamped) FROM python:3 ADD src/main.py / RUN chmod +x main.py RUN /usr/local/bin/python -m pip install –upgrade pip COPY . /opt/app RUN pip install -r /opt/app/requirements.txt ADD / /usr/local ENTRYPOINT [ "python", "./main.py" ] main.py if __name__ == ‘__main__’: if len(sys.argv) == 2: main(sys.argv[1]) def main(logs_file_archive): […]

Error when using `docker run` with volume

I’m really inexperienced with this. I’m a programmer, not a sysadmin. I’m trying to run a windows docker container on a windows host using this command: docker run –name DevSQLCont -p 1433:1433 -e accept_eula=y -e sa_password=Super5ecret! tobiasfenster/mssql-server-dev-unsupported:2019-cu14 -v sqlvolume:c:sqlvolume resulting in this error: (sorry for the german error text, – it sais that it couldn’t […]

Docker Compose why do volumes act in different directions?

I’m new to Docker and still testing it. I’ve been trying to set-up a web-development stack using compose and here is the thing I completely can’t understand: At first I’ve added nginx service with volumes like: – ./docker/nginx/www/123:/var/www/123 – ./docker/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf The first one to serve my files to the server, the second volume to serve […]

By Mike
Published
Categorised as docker, docker-compose, docker-volume Tagged , ,

docker-compose : Scaling containers with distinct host volume map

Here, I deployed 2 containers with –scale flag docker-compose up -d –scale gitlab-runner=2 2.Two containers are being deployed with names scalecontainer_gitlab-runner_1 and scalecontainer_gitlab-runner_2 resp. I want to map different volume for each container. /srv/gitlab-runner/config_${DOCKER_SCALE_NUM}:/etc/gitlab-runner Getting this error: WARNING: The DOCKER_SCALE_NUM variable is not set. Defaulting to a blank string. Is there any way, I can […]

1 2 3 48

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq