H
H
HexUserHex2020-01-26 16:55:39
Docker
HexUserHex, 2020-01-26 16:55:39

Volumes not showing up in portainer?

Good afternoon,
There is docker-compose.yml, which is currently running on the server, but there is one thing, but it does not display the used volumes (at the same time, of course, they are present on the server and checked through inspect and just the presence of files in the system)
Here is an example a small piece (if someone wants to run it for themselves):


version: "3.0"
services:
nextcloud:
image: nextcloud:latest
restart: always
ports:
- 80:80
volumes:
- /var/lib/docker/volumes/nextcloud:/var/www/html
portainer:
image: portainer/portainer
command: -H unix:///var/run/docker.sock
restart: always
ports:
- 9000:9000
- 8000:8000
volumes:
- /var/run/docker.sock: /var/run/docker.sock
- /var/lib/docker/volumes/portainer_data:/data

After I go to docker-compose and see volumes: 0.
Maybe I don’t understand something correctly, or it’s some kind of bug.
How do I check volumes:
docker inspect XXX | grep volumes

"/var/lib/docker/volumes/portainer_data:/data:rw"
"Source": "/var/lib/docker/volumes/portainer_data",

docker inspect YYYY | grep volumes

"/var/lib/docker/volumes/nextcloud:/var/www/html:rw"
"Source": "/var/lib/docker/volumes/nextcloud",

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2020-01-26
@q2digger

I can’t say anything about the porteiner, I don’t use it, xs what it is there and how it shows. But what you have drawn in docker-compose is called bind-mount.
https://docs.docker.com/storage/bind-mounts/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question