docker-volume

How do I change the umask of a shared docker volume?

Deadly 提交于 2019-12-10 20:21:37
问题 This is related to "https://stackoverflow.com/questions/36477636/how-do-i-implement-a-shared-hosting-like-service-with-docker". I am trying to setup a bunch of apache-php containers that should be able to rw to the docroot, and one single sftp container that should also be able to rw to the same directory. So, the plan is to create a shared volume, and mount it inside both containers (obviously in different places when it comes to the sftp container). I modified the official php:7-apache

RabbitMQ on Docker: Permission denied when chown-ing erlang cookie

◇◆丶佛笑我妖孽 提交于 2019-12-10 10:58:20
问题 I use Kitematic to manage my containers. I run rabbitmq on docker and it's running. The problem is when I configure its volume. Whenever I set local folder for its volume (in Kitematic) it will stop, start, and print the following error: chown: changing ownership of '/var/lib/rabbitmq/.erlang.cookie': Permission denied How do I solve this problem? 回答1: this should fix it chmod 600 /path/to/your/local/volume/.erlang.cookie Found the answer in https://serverfault.com/questions/406712/rabbitmq

Kubernetes (in Docker for Windows) Volume Configuration for Postgres

穿精又带淫゛_ 提交于 2019-12-09 22:45:49
问题 I have a tomcat + postgres application that I test with docker-compose. I am trying to package the application in a kubernetes config file. For now, I am running kubernetes (and kubectl) using my Docker Desktop for Windows installation. Eventually, I want to deploy to other environments. I am currently trying to replicate some of the volume functionality in docker-compose within the following config file. apiVersion: v1 kind: Pod metadata: name: pg-pod spec: volumes: - name: "pgdata-vol"

Docker add network drive as volume on windows

自闭症网瘾萝莉.ら 提交于 2019-12-09 10:04:47
问题 I am trying to mount a network drive as a volume. This is the command I am trying docker run -v //NetworkDirectory/Folder:/data alpine ls /data I am running this command on windows and the data directory is coming up empty. How can I mount this network directory as a volume on the windows host and access it inside the container? Working with local directories works just fine, so the following command works as expected. docker run -v c:/Users/:/data alpine ls /data I can make it work in linux

Mount a volume while using a docker container in Azure App Service

妖精的绣舞 提交于 2019-12-09 06:05:47
问题 I've deployed a Web App on Azure and use a Docker Container from the public registry (my own image) to host my website. But users can upload pictures and data is stored in json-files on the server. Of course I want to write these files to a mounted volume outside of the container. So that I can redeploy an update version of my website without losing data. Is that possible with Web Apps? Or do I need to move on to an Ubuntu VM with Docker on Azure? What I like about the webapps is I don't have

Docker (Dockerfile): Share a directory from host to container

有些话、适合烂在心里 提交于 2019-12-08 10:46:51
问题 I would like to know if there's any way that I can share a directory from my host machine to the docker container (Shared Volume) using Dockerfile. I understand that we can do that using volumes (-v option) while using docker run. But I couldn't find any way by which I can do that while using an Instruction of Dockerfile. I already tried VOLUME instruction in Dockerfile but couldn't succeed. Here's some details about my environment: [me@myHost new]$ tree -L 1 . |-- docker-compose.yml |--

Access file of windows machine from docker container

寵の児 提交于 2019-12-08 07:02:28
问题 I have installed Docker Desktop for Windows in Windows 10 operating system. I am running a python script inside docker container which reads file from disk and add few text at the end of files. Now the requirement is to read files from Windows 10 and perform the same operation on it. Is it possible in docker to read files from OS on top of which Docker is running? 回答1: Of course, you can use volumes. For example, you can run the following command: docker run -v path/to/your/file/on/host:path

Docker apache image, store logs in host?

江枫思渺然 提交于 2019-12-08 00:06:46
问题 I use Docker to build an Apache image, and then use docker-compose to run it. I set up Apache access.log and error.log and want to store them outside of the container. currently, I use Volumes but it stores the data both in container and host. docker-compose.yml version: '2' services: web: image: apache build: . container_name: my-image volumes: - "/var/log/my-app:/var/log/apache2" restart: always ports: - "8000:80" My question is how to only store apache log data in a host, and It woule be

Can't Delete file created via Docker

流过昼夜 提交于 2019-12-07 21:48:41
问题 I used a docker image to run a program on our school's server using this command. docker run -t -i -v /target/new_directory 990210oliver/mycc.docker:v1 /bin/bash After I ran it it created a firectory on my account called new_directory. Now I don't have permissions to delete or modify the files. How do I remove this directory? 回答1: Change the owner of all the files on the directory to your used ID within the container running as root, then exit the container and remove the directory. docker

Docker with Symfony 4 - Unable to see the file changes

爱⌒轻易说出口 提交于 2019-12-07 18:08:31
问题 I'm working on a docker image for dev environment for a Symfony 4 application. I'm building it on alpine , php-fpm and nginx . I have configured an application, but the performance was not great (~700ms) even for the simple hello world application, so I thought I can make it faster somehow. First of all, I went for semantics configuration and configured the volumes to use cached configuration. Then, I moved vendor to separate volume as it caused the most of performance issues. As a second