docker-volume

expose files from docker container to host

浪子不回头ぞ 提交于 2020-01-03 10:46:11
问题 I have a docker container that holds a django app. The static files are produced and copied to a static folder. container folder hierarchy: - var - django - app - static before i build the docker image, i run ./manage.py collectstatic so the static files are in the /var/django/static folder. To expose the app and serve the static files, i have on the host an nginx. The problem is that if i do a volume between the static folder and a designated folder on the host, when i run the docker

Create volume with docker volume with a custom Mountpoint

独自空忆成欢 提交于 2020-01-03 02:11:12
问题 I need to create a volume with "docker volume" with a personal Mountpoint (mountpoint="/my/path/ not /var/lib/docker...) but i can't use plugin like local-persist docker volume create -d local-persist -o mountpoint=/data/images --name=images i need something like this but without plugin, maybe it can be done with --opt= and somethig after that, but i'm new at docker and linux. I hope someone can help me, just pay attention: i need "docker volume create" not something that let me use personal

Docker in Docker - volumes not working: Full of files in 1st level container, empty in 2nd tier

廉价感情. 提交于 2019-12-30 06:49:40
问题 I am running Docker in Docker (specifically to run Jenkins which then runs Docker builder containers to build a project images and then runs these and then the test containers). This is how the jenkins image is built and started: docker build --tag bb/ci-jenkins . mkdir $PWD/volumes/ docker run -d --network=host \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /usr/bin/docker:/usr/bin/docker \ -v $PWD/volumes/jenkins_home:/var/jenkins_home \ --name ci-jenkins bb/ci-jenkins Jenkins works

Using Volumerize to backup my docker volumes with scp ?

旧城冷巷雨未停 提交于 2019-12-25 12:42:33
问题 I have a couple of docker volumes i want to backup onto another server, using scp/sftp. I don't know how to deal with that so i decided to have a look at blacklabelops/volumerize GitHub project. This tool is based on the command line tool Duplicity. Dockerized and Parameterized for easier use and configuration. Tutorial is dealing with a jenkins docker, but i don't understand how to mention i'm want to use a pem file. I've tried different solution (adding -i option to scp command line)

Docker Create Volume With Mountpoint

廉价感情. 提交于 2019-12-24 20:40:33
问题 i want to create a volume in docker/portainer for my raspberri pi's. i have set up a NFS server on one of the pi's and connected the other pi so that it can read/write to the NFS. (this is working as expected). i now want to make a named docker volume so that i can use volume in portainer. looking at the documentation, i have created the following command: https://docs.docker.com/engine/reference/commandline/volume_create/#driver-specific-options sudo docker volume create --driver local \ -

Windows 10 bind mounts in docker-compose not working

邮差的信 提交于 2019-12-24 18:23:26
问题 I'm using docker-compose to manage a multi container application. 1 of those containers needs access to the contents of a directory on the host. This seems simple according to the various sources of documentation on docker and docker-compose but I'm struggling to get it working. event_processor: environment: - COMPOSE_CONVERT_WINDOWS_PATHS=1 build: ./Docker/event_processor ports: - "15672:15672" entrypoint: python -u /src/event_processor/event_processor.py networks: - app_network volumes: - C

Is there a way to choose the path of named volumes with the default volume drives in docker?

这一生的挚爱 提交于 2019-12-24 08:22:35
问题 Is there a way to choose the path of named volumes with the default volume drives in docker? I know I can bind mount volumes in each service. I know I can create named volumes outside of services and them share them by mounting them in each service. But I can't find out a way to get the data (to be shared) on a path that I select instead of docker's /var/lib/docker/volumes/. Anyone tried to share a volume as a mount point in two different containers of the same docker-compose file where the

How to remove a volume in a Dockerfile

一笑奈何 提交于 2019-12-24 07:39:25
问题 I'm experiencing the same problem as found here: mkdir .ssh in a Dockerfile, folder is not there? I'm wondering if there is a way for my dockerfile to remove a volume declared by its parent? My reasoning for this is that; the volume was declared to mount to an external database, the image I'm creating is for testing purposes and contains the data present for the volume internally. Ideally I don't want to have to populate this in my entry point as it's an expensive operation. 回答1: See also How

In docker, can I publish a volumes with initial data?

半城伤御伤魂 提交于 2019-12-24 00:49:20
问题 I want to share a file storage between two containers. From the documentation, I've seen that you can create and use volumes like this: docker volume create --name DataVolume1 docker run -ti --rm -v DataVolume1:/datavolume1 ubuntu However, I want containers to be able to access an initial set of shared data. Does docker support publishing of volumes? If not, does this mean I should write the initial data manually, after creating the volume, or is there another solution for publishing the data

Mounting volume in Azure-Container-Service not working for traefik.toml and /var/run/docker.sock

泪湿孤枕 提交于 2019-12-24 00:44:11
问题 Building an CI/CD pipeline from VSTS to Azure-container-service I've ran into an issue mounting the traefik.toml and the docker.sock file. The deployment uses an SSH tunnel to create a folder /Deploy/ and copy the docker-compose.yml and traefik.toml. The files are there, the containers are spun up. Yet not handled by traefik, because it does not 'see' the containers. The traefik tutorial shows we can mount the like so in a docker-compose.yml : version: '2' services: proxy: build: context: .