Questions tagged [volumes]
322 questions
11
votes
3 answers
How to clean up Docker ZFS legacy shares
Summary
Given that:
The storage driver docker users is ZFS;
Only docker creates legacy datasets;
Bash:
$ docker ps -a | wc -l
16
$ docker volume ls | wc -l
12
$ zfs list | grep legacy | wc -l
157
16 containers (both running and stopped). 12…

Redsandro
- 11,060
- 13
- 76
- 106
10
votes
2 answers
Conditionally mount volumes in docker-compose for several conditions
I use docker and docker compose to package scientific tools into easily/universally executable modules. One example is a docker that packages a rather complicated python library into a container that runs a jupyter notebook server; the idea is that…

nben
- 646
- 5
- 20
10
votes
2 answers
Move docker bind-mount to volume
Actually, I run my containers like this, for example :
docker run -v /nexus-data:/nexus-data sonatype/nexus3
^
After reading the documentation, I discover volumes that are completely managed by docker. For some reasons, I want to…

fmdaboville
- 1,394
- 3
- 15
- 28
9
votes
3 answers
Re-attach volume claim on deployment update
I'm using persistent volume claim to store data in container:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: test-pvc
labels:
type: amazonEBS
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage:…

Kirill
- 7,580
- 6
- 44
- 95
9
votes
2 answers
Docker Compose: Which syntax produces a bind mount, which produces a volume
In the Docker Compose documentation, here, you have the following example related to the volumes section of docker-compose.yml files:
volumes:
# (1) Just specify a path and let the Engine create a volume
- /var/lib/mysql
# (2) Specify an…

jeromerg
- 2,997
- 2
- 26
- 36
8
votes
4 answers
Kubernetes on docker for windows, persistent volume with hostPath gives Operation not permitted
I am trying to connect a folder in windows to a container folder. This is for a .NET app that needs to read files in a folder. In a normal docker container, with docker-compose, the app works without problems, but since this is only one of several…

Tryggen
- 103
- 1
- 7
7
votes
1 answer
Is read/write performance better with docker volumes on windows (inside of a docker container only) or a mounted / shared volume with host OS?
I have read that there is a significant hit to performance when mounting shared volumes on windows. How does this compared to only having say the postgres DB inside of a docker volume (not shared with host OS) or the rate of reading/writing from/to…

AustEcon
- 122
- 1
- 3
- 8
7
votes
1 answer
dockerized postgresql with volumes
i am relatively new to docker. I'd like to set up a postgres database but I wonder how to make sure that the data isn't being lost if I recreated the container.
Then I stumbled over named volumes (not bind volumes) and how to use them.
But... in a…

Chris
- 566
- 1
- 8
- 20
6
votes
0 answers
Docker-Compose volume mount issue in GitHub Actions checked out Repository
I have the following logic in my Github Actions:
Checkout a different repository
Inside that repository run docker command
Checkout my current repository of the workflow
Run code on the running docker instance
However, when I do this, I see that a…

Hayk
- 441
- 1
- 4
- 7
6
votes
2 answers
Docker named volumes between multiple containers
I want to deploy some services into my server and all of them will use nginx as web server, every project has it own .conf file and I want to share all of then with nginx container. I tried to use named volumes but when it's used by more than one…

Paulo Mesquita
- 103
- 8
6
votes
2 answers
docker-compose : absolute path for shared volumes in version 3
To replace the volumes_from: directive from version 2 (for helpyio), I tried this, but something went wrong.
version: "3"
services:
frontend:
...
volumes:
- myVolume:/var/www:ro
backend:
...
volumes:
-…

esprit libre
- 61
- 1
- 4
6
votes
2 answers
Docker for Windows : volumes are empty
I updated from Windows 7 to Windows 10 few weeks ago : I was using Docker Toolbox/Virtual Box to work with Docker and I read Docker for Windows was recommended (newest application) but it is a pain for me to make it work as it used to with…

Marien
- 75
- 1
- 6
6
votes
2 answers
Persistent /etc/passwd on a docker container
I have create a docker image that allows users to connect on it with SSH.
For security reason, I'd like to users can change their password. I only use docker named volumes, so I can't bind /etc/passwd and I don't want to mount all /etc
Any ideas?…

lama02
- 161
- 2
- 8
6
votes
2 answers
docker run... enter container... then every command gets "ReferenceError: is not defined"
This has happened with multiple command variations.
Basically...
First I run the container: docker run -it --publish 8080:8080 --name app_in_docker node:latest
Then I have this response in the next line after a couple seconds:
>
This make it appear…

Kevin Danikowski
- 4,620
- 6
- 41
- 75
5
votes
3 answers
Why should I use Kubernetes Persistent Volumes instead of Volumes
To use storage inside Kubernetes PODs I can use volumes and persistent volumes. While the volumes like emptyDir are ephemeral, I could use hostPath and many other cloud based volume plugins which would provide a persistent solution in volumes…

Aditya Bhuyan
- 328
- 6
- 10