docker-volume

HostPath with minikube - Kubernetes

萝らか妹 提交于 2019-12-03 15:14:52
问题 UPDATE: I connected to the minikubevm and I see my host directory mounted but there is no files there. Also when I create a file there it will not in my host machine. Any link are between them I try to mount an host directory for developing my app with kubernetes. As the doc recommended, I am using minikube for running my kubernetes cluster on my pc. The goal is to create a develop environment with docker and kubernetes for develop my app. I want to mount a local directory so my docker will

Docker add network drive as volume on windows

喜欢而已 提交于 2019-12-03 12:46:39
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 since I can mount the share with cifs-utils on a local directory and use that directory as the volume.

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

给你一囗甜甜゛ 提交于 2019-12-03 07:39:05
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 to worry about managing the VM and only care about my container. This blog post is a great start and

HostPath with minikube - Kubernetes

孤者浪人 提交于 2019-12-03 04:54:54
UPDATE: I connected to the minikubevm and I see my host directory mounted but there is no files there. Also when I create a file there it will not in my host machine. Any link are between them I try to mount an host directory for developing my app with kubernetes. As the doc recommended, I am using minikube for running my kubernetes cluster on my pc. The goal is to create a develop environment with docker and kubernetes for develop my app. I want to mount a local directory so my docker will read the code app from there. But it is not work. Any help would be really appreciate. my test app

How to change the default location for “docker create volume” command?

喜你入骨 提交于 2019-12-03 04:16:10
问题 When creating volumes through the volume API, that is, as the container volume pattern is now not necessarily the best practice anymore: # docker volume inspect test-data [ { "Name": "test-data", "Driver": "local", "Mountpoint": "/var/lib/docker/volumes/test-data/_data" } ] I would like to, for example, have docker volumes exist in /data (which is mounted in a different physical volume). This is not possible to do with symbolic links, it is possible to do with bind mounts, but would I'm

How to change the default location for “docker create volume” command?

让人想犯罪 __ 提交于 2019-12-02 17:35:06
When creating volumes through the volume API, that is, as the container volume pattern is now not necessarily the best practice anymore: # docker volume inspect test-data [ { "Name": "test-data", "Driver": "local", "Mountpoint": "/var/lib/docker/volumes/test-data/_data" } ] I would like to, for example, have docker volumes exist in /data (which is mounted in a different physical volume). This is not possible to do with symbolic links, it is possible to do with bind mounts, but would I'm wondering if there is some configuration in Docker to change the default location for each separate volume.

Create Docker volume with preexisting data in it

丶灬走出姿态 提交于 2019-12-02 09:45:28
I have a MySQL image that I launch a container from. I set up dbs , import sql-dump files and create users every time the container is created. When I work on the container I create various data that are stored in MySQL. I would like to save these extra data in a data volume container [DVC] so I could give the DVC to a colleague and continue from where I stopped. The thing is that he will also launch a MySQL container and the initial procedure will be repeated from scratch. As I have read, if I mount [ --volumes-from ] the volumes [ /etc/mysql and /var/lib/mysql ] from the DVC , the already

How to remove configure volumes in docker images

∥☆過路亽.° 提交于 2019-12-01 22:13:08
I use docker run -it -v /xx1 -v /xx2 [image] /bin/bash to create a container. Then commit to image and push to docker hub. use docker inspect [image] The Volumes detail is "Volumes": { "/xx1": {}, "/xx2": {} }, Now I want to remove volume /xx1 in this image. What should I do? I don't think this is possible with the Docker tools right now. You can't remove a volume from a running container, or if you were to use your image as the base in a new Dockerfile you can't remove the inherited volumes. Possibly you could use Jérôme Petazzoni's nsenter tool to manually remove the mount inside the

How to mount a directory inside a docker container on Linux host [duplicate]

人走茶凉 提交于 2019-12-01 13:21:10
问题 This question already has answers here : Mount directory in Container and share with Host (3 answers) Closed last year . I would like to mount a directory from a docker container to the local filesystem. the directory is a website root and I need to be able to edit it my local machine using any editor. I know I can run docker run -v local_path:container_path but doing that it is only creating an empty directory inside the container. How can one mount a directory inside a docker container on

Docker - How to access a volume not attached to a container?

好久不见. 提交于 2019-12-01 05:35:55
问题 I have (had) a data container which has a volume used by other containers (--volumes-from). The data container has accidentally been removed. Thankfully the volume was not removed. Is there any way I can re run the data container and point it BACK to this volume? 回答1: Is there any way can re run the data container and point it BACK to this volume? Sure, I detailed it in "How to recover data from a deleted Docker container? How to reconnect it to the data?" You need to create a new container