docker-volume

I am trying to use gcs bucket as the volume in gke pod

依然范特西╮ 提交于 2019-12-07 05:46:23
问题 I am getting the error: error validating "mysql.yaml": error validating data: ValidationError(Deployment.spec.template.spec.volumes[0]): unknown field "path" in io.k8s.kubernetes.pkg.api.v1.Volume; ) apiVersion: extensions/v1beta1 kind: Deployment metadata: name: mysql labels: app: mysql spec: replicas: 1 selector: matchLabels: app: mysql template: metadata: labels: app: mysql spec: containers: - image: mysql:5.6 name: mysql env: - name: MYSQL_ROOT_PASSWORD valueFrom: secretKeyRef: name:

docker run with --volume

*爱你&永不变心* 提交于 2019-12-07 04:49:52
问题 I'm trying to dockerize some services for development on my machine and wondering how docker run --volume=.. works. For example, if I do something like docker run --volume=/path/to/data:/data [...] will /path/to/data be (re)created locally only if it doesn't exist? Is the initial data copied from the container's image? Links to relevant documentation would be appreciated. 回答1: The --volume option is described in the docker run reference docs, which forwards you on to the dedicated Managed

How to store a specific named docker volume at a specific location without changing the default?

一笑奈何 提交于 2019-12-07 03:36:01
问题 I would like to create a named volume for one of my containers. This container will need a lot more storage than other containers I run, so I would like to store that particular volume on a different disk that has lots of free space. I still want the other volumes on the default disk, only that one named volume should go on another disk. I don't want to use a bind mount because it will make backing up and migrating more complicated. The only option I can think of is to manually move the

Mount a volume in docker-compose conditionally

白昼怎懂夜的黑 提交于 2019-12-06 17:00:23
问题 I have a docker-compose.yml configuration. One of the containers there is a Tomcat server and it has some default .war file deployed in webapps directory. I want to have the ability to pass (override) the war archive to be deployed by some which resides on the host machine. I think the best would be to have ability somehow switch / override starting docker-compose : as a default, I want to run the webapp ( war file) which is inside the container, but I want to have a possibility to mount a

Access file of windows machine from docker container

萝らか妹 提交于 2019-12-06 15:46:29
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? Of course, you can use volumes . For example, you can run the following command: docker run -v path/to/your/file/on/host:path/to/the/file/on/container your_image The only approach to access the host file is that you can mount the

Docker apache image, store logs in host?

守給你的承諾、 提交于 2019-12-06 09:43:54
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 better if there is a way to stream apache log data to stdout so that I don't need to store in the host.

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

醉酒当歌 提交于 2019-12-06 09:33:27
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? skeenzdev this should fix it chmod 600 /path/to/your/local/volume/.erlang.cookie Found the answer in https://serverfault.com/questions/406712/rabbitmq-erlang-cookie . I had the same issue and this fix it. The error message being returned is missing

Docker with Symfony 4 - Unable to see the file changes

别等时光非礼了梦想. 提交于 2019-12-06 03:51:25
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 thing I wanted to use docker-sync as the benchmarks looked amazing. I configured it and everything ran

How specify the size of a shared Docker volume?

…衆ロ難τιáo~ 提交于 2019-12-06 02:46:19
问题 If I would like to create a data volume of let´s say 15GB that would be of type ext4, how would I do that? docker volume create --name vol just creates an empty volume. docker volume create --opt type=ext4 --name vol creates an ext4 volume but I cannot specify the size of it since ext4 does not support it according to the mount options of ext4. 回答1: It is possible to specify the size limit while creating the docker volume using size as per the documentation Here is example command provided in

docker-compose: define mount for bind mount and managed mount

ぃ、小莉子 提交于 2019-12-05 09:49:02
问题 I'm using docker-compose for defining my service. In docker, there are two concepts for docker volume. Firstly is about bind mount : mount on host storage. docker run -d --name web-app -v $HOST/location:/container/location -p 80:80 httpd:latest Secondly is about managed mount : abstract storage, not depend on host. docker run -d --name web-app -v /container/location -p 80:80 httpd:latest I want to map those concepts to docker-compose. It means how can I define bind mount and managed mount