docker-volume

How to upgrade docker container with previous network and volumes?

爱⌒轻易说出口 提交于 2019-12-12 04:47:18
问题 I'm developing an app where we pop containers with volumes and custom network. I need to add the feature where admin will be able to upgrade the running container to latest version. So I was hoping to be able to fetch the various information from it the pop a new container with the old config. Question However I'm not sure what I really need to grab on the old container and how to use it. For instance, Is NetworkSettings.Networks enough or is there network information elsewhere in the data ?

Docker: Mount volume from Windows host

倖福魔咒の 提交于 2019-12-12 03:34:41
问题 I use 1.12 version of Docker on Windows, since I can't use the Hyper-V feature with the newer "native" version - so I have my quickstart terminal and communicate to docker host via the invisible underlying virtual box. Now I have the problem, that I need to mount a local folder to a container, which worked successfully from within the docker-machine by adding --volume="`pwd`:/root/data" to the docker run command, but it does not when I launch the same command from my Windows quickstart

Manually sharing directory as docker volume mounting point on OSX

喜欢而已 提交于 2019-12-12 02:17:37
问题 According to this tutorial from docker website, When you start a container it automatically shares your /Users/username . My current problem : But in my school my $HOME isn't in /Users , and when I try to directly mount volumes on my container with something like docker run -d -P -v $HOME/site:/usr/share/nginx/html --name mysite nginx (like the tutorial from the link), I can't change files through the mounted volume. So I guess my $HOME isn't automatically shared. But if I run docker instpect

Container keeps crashing for Pod in minikube after the creation of PV and PVC

我是研究僧i 提交于 2019-12-11 19:11:57
问题 i have a REST application integrated with kubernetes for testing REST queries. Now when i execute a POST query on my client side the status of the job which is automatically created remains PENDING indefinitely. The same happens with the POD which is also created automatically When i looked deeper into the events in dashboard, it attaches the volume but is unable to mount the volume and gives this error : Unable to mount volumes for pod "ingestion-88dhg_default(4a8dd589-e3d3-4424-bc11

Share executable between docker images

谁说胖子不能爱 提交于 2019-12-11 16:46:43
问题 Maybe it is really lame question, but would it be possible to share some executables to all docker containers at once? The reason is i.e. JDK part of the image is pretty big, why not put the binaries in some volume and then just execute java command from there? Is it feasible at all or nonsense from the start? 回答1: The reason is i.e. JDK part of the image is pretty big, why not put the binaries in some volume and then just execute java command from there? Docker images should be portable, and

Can a .dockeringore file include a volume folder?

谁都会走 提交于 2019-12-11 15:05:40
问题 Imagine a project folder like this: project_folder source_code_folder_1 docker_volume_folder source_code_file_1 Dockerfile docker-compose.yml .dockerignore Now, if the Dockerfile contains an instruction ADD . /code/ , and if the docker-compose.yml file configures a service that uses the docker_volume_folder in its volume mapping, can I then add the docker_volume_folder in the .dockerignore file, to prevent that the volume folder is copied to the docker container by the ADD . /code/

Dockerized executable read/write on host filesystem

一笑奈何 提交于 2019-12-11 14:32:54
问题 I just dockerized an executable that reads from a file and creates a new file in the very directory that file came from. I want to use Docker in that setup, so that I avoid installing numerous third-party libraries in the production environment. My problem now: I have file /this/is/a.file on my underlying (host) file system and my executable is supposed to create /this/is/b.file . As far as I see it, the only chance to get this done is by mapping a volume that points to /this/is and then let

Replicate docker-compose volume behavior in kubernetes

随声附和 提交于 2019-12-11 07:48:57
问题 I am migrating a docker-compose file for a tomcat + postgres application to kubernetes. My test environment is Dockers for Windows with Kubernetes enabled. If I use an emptyDir volume for postgres, I am able to test my application successfully, but I am unable to persist postgres data. volumes: - name: "pgdata-vol" emptyDir: {} On MacOS, I am able to persist postgres data using a hostPath volume. volumes: - name: "pgdata-vol" hostPath: path: /tmp/vols/pgdata Unfortunately, if I try the same

Unable to write file from docker run inside a kubernetes pod

橙三吉。 提交于 2019-12-11 04:21:02
问题 I have a docker image that uses a volume to write files: docker run --rm -v /home/dir:/out/ image:cli args when I try to run this inside a pod the container exit normally but no file is written. I don't get it. The container throw errors if it does not find the volume, for example if I run it without the -v option it throws: Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path '/out/file.txt'. But I don't have any error from the container. It finishes

What is the purpose of Dockerfile command “Volume”?

拟墨画扇 提交于 2019-12-11 02:25:04
问题 When a Dockerfile contains VOLUME instruction (say) VOLUME [/opt/apache2/www, ...] (hope this path exists in real installation), it means this path is going to be mounted to something (right?). And this VOLUME instruction is for the image and not for one instance of it (container) but for every instance. Anyway irrespective of whether an image contains a VOLUME defined or not, at the time of starting a container the run command can create a volume by mapping a local host path to a container