Closed nk9 closed 1 month ago
Hi,
Thank you for the notice! Can send a PR fixing the docker build files and the compose files that removes volumes from the build files, but keeps the current compose behavior? (I mean keeps exposing config and images folder)
-- Sorry for being brief, sent from my phone.
On Fri, 24 Nov 2023, 17:17 Nick Kocharhook, @.***> wrote:
Describe the bug
Dockerfiles have a VOLUME directive, but it's quite problematic and has no benefits over describing the volumes at runtime using -v or docker compose.
- Here's an article https://boxboat.com/2017/01/23/volumes-and-dockerfiles-dont-mix/ that goes over the issues. "So go ahead, use volumes, they are a great feature of Docker. Just don't define them inside your Dockerfile."
- And a StackOverflow answer https://stackoverflow.com/a/62068396/1749551 which also highlights these same problems
The recommended way to use piGallery2 with Docker is to use the docker-compose.yml file, which declares the volumes itself. Given that, it may be possible to just remove the VOLUME directive entirely.
— Reply to this email directly, view it on GitHub https://github.com/bpatrik/pigallery2/issues/777, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZKA5RZJDHUPR6PFBBDG5LYGDCAFAVCNFSM6AAAAAA7ZKWPBOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYDSOJVGM3TONQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Describe the bug
Dockerfiles have a
VOLUME
directive, but it's quite problematic and has no benefits over describing the volumes at runtime using-v
ordocker compose
.The recommended way to use piGallery2 with Docker is to use the
docker-compose.yml
file, which declares the volumes itself. Given that, it may be possible to just remove theVOLUME
directive entirely.