docker-volume

Listing the contents of a directory in a shared volume with 200K files from within a ubuntu container hosted in windows gets stuck

此生再无相见时 提交于 2020-04-07 08:23:12
问题 Problem Listing the contents of a directory in a shared volume with 200K files from within a ubuntu container hosted in windows gets stuck. How to reproduce Install Docker Desktop 2.2.0.3 (42716) stable on Windows 10 Configure docker to work in WSL (Ubuntu 16 distribution) Expose daemon on tcp://localhost:2375 without TLS In WSL, define environment variable DOCKER_HOST=localhost:2375 In WSL, in /etc/wsl.conf in the [automount] section, define root = / Create a folder on the Windows host that

NodeJS is not detecting change in Docker Bind Mount until Swarm is restarted

这一生的挚爱 提交于 2020-01-25 02:49:48
问题 I'm building a NodeJS application on Docker in Swarm mode (single node). I'm using bind mount volume for NodeJS source code. Everything runs perfectly and I can see the output in localhost from NodeJS and Express, but when I change something in NodeJS code (which is in a bind mount volume), nothing changes. I have to restart my service to observe the changes. Earlier when I was working with Docker Compose only, it never happened, but now when I have switched to Swarm, I'm experiencing

mount files present in a directory in docker image with the directory in the host

那年仲夏 提交于 2020-01-24 19:37:07
问题 I have a docker image in which there are few configuration files present in the directory /opt/app/config now i wanted to mount this directory to a host directory so that config files can be accessed from host. my docker compose is a follows web: image: web:v1 container_name: web volumes: - ./config:/opt/app/config command: ["tail","-f","/dev/null"] ports: - 5000:5000 if i run the individual web image using docker run -it web:v1 bash and do ls /opt/app/config i can see the config files but

How to copy multiple files into a docker data volume

守給你的承諾、 提交于 2020-01-24 05:09:11
问题 It may sound trivial but I couldn't find a easy way to copy multiple files into the root folder of a docker volume. I am using Ubuntu Xenial 16.04 and Docker 1.12.1 . For example if I have an Ubuntu container with the volume /my_data : docker run --name my_container -v /my_data -d ubuntu:latest In my host machine I have a folder called /tmp/my_data/ with multiple files inside, and I would like to copy all those files into the volume /my_data in my_container . I have tried the following

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

自闭症网瘾萝莉.ら 提交于 2020-01-21 11:12:25
问题 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/mysql:/var/lib/mysql:rw The directory ./var/lib/mysql does not exist initially. After running docker-compose up .. ls -al ./var/lib/mysql command shows all the files with user:group 999:999 . I cannot find user or group called 999 in my system. Why docker-compose chooses to create files with a non-existing uid

How to create docker volume device/host path

痞子三分冷 提交于 2020-01-15 05:24:08
问题 I believe there is an easy way to copy files into a docker volume that has already been mounted to a container. docker cp /tmp/my_data/. my_container:/my_data as referenced by How to copy multiple files into a docker data volume But, how does one create a named volume using docker volume create --name my-volume that already has files in it? I have read that it's not a good idea to cp files into the {{.Mountpoint}} . I'm new to docker and all of it's nuancies, so apologies if my fundamental

Docker volume performance degradation

我只是一个虾纸丫 提交于 2020-01-15 03:27:54
问题 I was running some performance benchmarks using fio to compare the performance of a Docker volume (created using the -v option) against the performance of a volume mounted on the host machine. I am using the following command to run IO on both the volumes: fio --name=seqwrite --ioengine=libaio --iodepth=1 --rw=write --bs=8M --direct=1 --size=1024M --numjobs=24 --runtime=300 --group_reporting For the host-mounted volume I am using a single SATA drive (2TB) formatted using ext4. The throughput

Docker-Compose not able to copy haproxy.cfg

假装没事ソ 提交于 2020-01-11 09:50:14
问题 My problem is that I have a docker-compose.yml file and an haproxy.cfg file and I want docker-compose to copy the haproxy.cfg file to the docker container. As per the post Docker composer copy files I can use volumes to do it but in my case I'm getting the below error. Can anybody help me achieve this. Below is the code and everything docker-compose.yml version: "3.3" services: ###After all services are up, we are initializing the gateway gateway: container_name: gateway-haproxy image:

GitLab on Docker: how to persist user data between deployments?

眉间皱痕 提交于 2020-01-06 04:27:04
问题 I am using the official GitLab Docker image. I want to have pre-configured user accounts available in my GitLab container to be used for tests. But user accounts are saved in a volume, so I can't just commit and push the GitLab image after having created my test users. So: how should I persist them? One way would be to create them on startup using the API after each new deployment, but this is quite slow/cumbersome. 回答1: As you said, it's not going to be as easy as committing and pushing a

Can't access a volume during building a docker image

自古美人都是妖i 提交于 2020-01-05 05:45:07
问题 I am trying to create a docker container with a volume called 'example', which has some files inside it, but I can't access it during build. Here are the files I am using: # docker-compose.yml version: "3" services: example: build: . volumes: - "./example:/var/example" stdin_open: true tty: true And: # Dockerfile FROM ubuntu RUN ls /var/example CMD ["/bin/bash"] When I run: sudo docker-compose up It gives me an error: ls: cannot access /var/example: No such file or directory But when I delete