Questions tagged [volumes]
322 questions
3
votes
1 answer
Setting volumes in docker-compose
I need a way to configure docker-compose to create a volume if it's missing, or in case it exists, use it.
I need it to be persistent between versions, but I cannot assure it'll be configured upon initial configuration.
volumes:
my_volume:
…

OLS
- 155
- 15
3
votes
0 answers
Explore docker volumes on windows 10
My working env. is: Windows 10 Pro Up-to-Date (13/01/2020) and Docker 19.03.5
Trying to map a volume to a folder location from dockers to windows FS is not working as read on this discussion:
https://github.com/docker-library/mariadb/issues/152
So…

jdamianb
- 76
- 5
3
votes
2 answers
Dynamic changes of environment variable setted in ConfigMap
I have defined an environment variable for a container from a Configmap, But I want to apply changes automatically when changing the variable value in the ConfigMap.
Maybe we can target an environment variable in volume path !?

Smaillns
- 2,540
- 1
- 28
- 40
3
votes
1 answer
Data does not persist to host volume with docker-compose.yml for MongoDB
Have docker installed on my Mac along with MongoDB image. When I start the container with volume specified directly in the docker run command, the data gets persisted even after I stop the container. But the same does not work when I do it via…

shrap7
- 79
- 1
- 5
3
votes
1 answer
Mounting a volume with kubectl
I want to mount a volume with kubectl and get a shell in the environment.
I've tried this:
kubectl run -i --rm --tty alpine --overrides='
{
"apiVersion": "v1",
"spec": {
"template": {
"spec": {
"containers": [
{
…

Juicy
- 11,840
- 35
- 123
- 212
3
votes
2 answers
Docker-Compose mount volume overwrites host files
I am mounting a directory from a CMS with content files inside a docker container.
The mounting works absolutely.
The CMS got some basic files, which are copied into the mounted folder in the container during build. Then it will be mounted to a…

Philipp Schemel
- 943
- 8
- 19
3
votes
1 answer
Can't add write permission to docker volume in docker-compose
Issue
My main goal is to create a wordpress container on my linux machine for development on that container.
Therefore, I'm creating new volumes for the plugins and themes folders and even add read & write permissions, with the :rw option.
However,…

Bar Bokovza
- 169
- 1
- 2
- 12
3
votes
0 answers
Docker composer volumes on WSL
I'm trying to perform a trivial action: share folder between host and container.
But when I'm mounting some folders from host they appear empty in the container.
I've done following:
version: '3'
services:
t1:
image: ubuntu
volumes:
…

Eugene
- 301
- 1
- 4
- 13
3
votes
2 answers
MacOS Kitematic How To Configure Volumes
I'm the docker newest user. I create container by Kitematic, but why my Configure Volumes is empty, and how to add some folder?
I can use command to add volume:
docker run -it -v /home/dock/Downloads:/usr/Downloads:ro ubuntu64 /bin/bash
But how to…

cs x
- 621
- 2
- 8
- 23
3
votes
1 answer
How is the execution order of docker run command' options (such as "-v" )?Which first execute?
I want to run a docker with mounting a host directory. The command is like this "docker run -it -v /hostdata:/data /bin/echo hello world". So, I'd like to know the sequence of option "-v /hostdata:/data " and "/bin/echo hello" command. That docker…

David
- 33
- 4
3
votes
0 answers
Docker Volumes - very slow run-Command
I have a Docker container which used to save all data in a dedicated volume data to be persistent. That volume was created using the docker volume create command. I Have roughly 1,5 M files in the volume.
When i run a fresh container and want to…

user3750030
- 327
- 3
- 7
3
votes
1 answer
Docker: Creating a data volume container vs simply using the -v flag with `run`?
I'm reading Docker's user guide section on volumes at: https://docs.docker.com/engine/userguide/containers/dockervolumes/
At the very first part it indicates how to create and add a volume to a container, this I will call "method 1":
You can use…

Jose V
- 1,655
- 1
- 17
- 31
3
votes
1 answer
Two docker container need volumes from each other
Docker: Reciprocating volumes
I am creating two containers running 2 different applications. Container A, exposes 2 directories say /opt/appA and /home/userA/runtime. Both are needed to be referred to by container B (--volumes-from A). B in turn…

yogmk
- 161
- 10
3
votes
1 answer
Docker - Exposing container directories to host directories without obscuring original contents
I am still relatively new to Docker, so I haven't quite figured out all the nuances yet, so forgive me if this has already been resolved elsewhere.
I would like to share files between the container and the host.
So far I have been using volumes, and…

User588233
- 481
- 2
- 5
- 16
3
votes
1 answer
Powershell Script to compare VolumeID to DriveLetter
I have a powershell script running wbadmin with source C: to a target iSCSI volume which is specified by its volume ID (\?\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}).
The backup itself runs perfectly fine, I just wanted to add an offsite-backup…

HannesS
- 173
- 6