Hi
Im fairly new to docker and do have a system running on fedora. Ive realised that its in a bit of a mess as a lot of the containers ive copied config from various sites and the volumes are in all sorts of setup which is what i need some help with. Below are examples of the different setups ive got in containers.
If someone could please explain hows best to have and and is it fixable.
so the first containers on this system were for a flight tracking system, its volumes are as shown.
.Thse are bind mounts again. The reference is a standard relative path reference, so the folders are where your docker compose context is. If it is not overwritten, that should be the same fodler where your compose file is.
I’m not sure what to say about this part. But these would be volumes like “grafana-storage”.
You could configure volume parameters, but you can also leave that empty.
That is an external volume, so not managed by compose which would add athe project name as a prefix to the volume names. You can create volumes with docker volume create and refer to volumes in compose files as external.
Hi
Thanks for the reply. Had a read through your blog and was a big help. Think ive worked it out now.
So i use portainer for most of the containers. the only exception is the adsb using ultrafeeder which uses a .env and i have to run that outside of portainer.
All the other containers i have were all compose files from the relevant website which is why i think there is no standard location being used.
So these are under the docker data folder as expected and shown in “docker volume ls”
The pihole and few others with the format of ./etc-pihole etc above are in the folder /data/compose. Not sure why its there though. Is there an easy way to move this without losing data so its under docker/volumes
Bind mounting is comoletely fine as long as you can set the right permissions. I would not make them a volume, but if you want to, you can change the compose file and run docker compose up, so the volumes are created by compose. Then you cans top the services, or at least the one for which you changed the volume and you can copy data to the volumes using `docker cp`` even if the container is stopped.
PS.: Please, don’t make a screenshot of your previous posts. You can select the text you would like to quote and you can click on the “Quote” button that appears after the selection. That will insert that text into the message field.