docker-volume

Docker: Files from volume not updated in target

旧巷老猫 提交于 2021-01-27 07:01:05
问题 I'm newbie in Docker and I have created an image with this Dockerfile: FROM node:8.12.0 LABEL version="1.0" WORKDIR /usr/src/app COPY package*.json ./ RUN npm install COPY . . EXPOSE 8080 CMD ["node", "index.js"] I run the image and it works. But If I run the image mapping host directory with WORKDIR when I update index.js in host directory this updating is not propagated into WORKDIR. I run the image with this command: docker run --name basketmetrics -v /home/josecarlos/Workspace/nodejs

Docker volumes on Windows WSL2

*爱你&永不变心* 提交于 2021-01-21 05:06:17
问题 I'm just trying out WSL 2 with Docker for Windows and I'm having an issues with mounted volumes : version: "3.7" services: node: build: . container_name: node hostname: node volumes: - ./app:/app stdin_open: true the container build and start well, I access it with docker exec nicely but the /app folder inside the container isn't bound to my laptop app folder. However the right path is actually correctly mounted on the running container : (here I do pwd on the host to if it matches perfectly

Docker volumes on Windows WSL2

爱⌒轻易说出口 提交于 2021-01-21 05:04:31
问题 I'm just trying out WSL 2 with Docker for Windows and I'm having an issues with mounted volumes : version: "3.7" services: node: build: . container_name: node hostname: node volumes: - ./app:/app stdin_open: true the container build and start well, I access it with docker exec nicely but the /app folder inside the container isn't bound to my laptop app folder. However the right path is actually correctly mounted on the running container : (here I do pwd on the host to if it matches perfectly

Docker Anonymous Volumes

这一生的挚爱 提交于 2021-01-21 01:10:44
问题 I've seen Docker volume definitions in docker-compose.yml files like so: -v /path/on/host/modules:/var/www/html/modules I noticed that Drupal's official image, their docker-compose.yml file is using anonymous volumes. Notice the comments: volumes: - /var/www/html/modules - /var/www/html/profiles - /var/www/html/themes # this takes advantage of the feature in Docker that a new anonymous # volume (which is what we're creating here) will be initialized with the # existing content of the image at

Docker Anonymous Volumes

放肆的年华 提交于 2021-01-21 01:03:38
问题 I've seen Docker volume definitions in docker-compose.yml files like so: -v /path/on/host/modules:/var/www/html/modules I noticed that Drupal's official image, their docker-compose.yml file is using anonymous volumes. Notice the comments: volumes: - /var/www/html/modules - /var/www/html/profiles - /var/www/html/themes # this takes advantage of the feature in Docker that a new anonymous # volume (which is what we're creating here) will be initialized with the # existing content of the image at

Docker Anonymous Volumes

二次信任 提交于 2021-01-21 01:00:26
问题 I've seen Docker volume definitions in docker-compose.yml files like so: -v /path/on/host/modules:/var/www/html/modules I noticed that Drupal's official image, their docker-compose.yml file is using anonymous volumes. Notice the comments: volumes: - /var/www/html/modules - /var/www/html/profiles - /var/www/html/themes # this takes advantage of the feature in Docker that a new anonymous # volume (which is what we're creating here) will be initialized with the # existing content of the image at

Accessing Docker Volume content on MacOS

不羁岁月 提交于 2021-01-17 05:01:25
问题 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 docker runs on inside a very tiny VM. I can use screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty to get into the vm and then navigate to the folder to see the volumes. So got all that, but my question is: How do I link what is in these volumes on my host machine? I have tried this: docker run -it

Accessing Docker Volume content on MacOS

余生长醉 提交于 2021-01-17 04:56:35
问题 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 docker runs on inside a very tiny VM. I can use screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty to get into the vm and then navigate to the folder to see the volumes. So got all that, but my question is: How do I link what is in these volumes on my host machine? I have tried this: docker run -it

Docker persisted volum has no permissions (Apache Solr)

旧时模样 提交于 2020-12-13 09:31:11
问题 My docker-compose.yml : solr: image: solr:8.6.2 container_name: myproject-solr ports: - "8983:8983" volumes: - ./data/solr:/var/solr/data networks: static-network: ipv4_address: 172.20.1.42 After bringing up the docker with docker-compose up -d --build , the solr container is down and the log ( docker logs myproject-solr ) shows this: Copying solr.xml cp: cannot create regular file '/var/solr/data/solr.xml': Permission denied I've noticed that if I give full permissions on my machine to the