From 14c6ead389df61cd5694b91d0abfe3a83047923a Mon Sep 17 00:00:00 2001 From: Nick Reilingh Date: Sat, 11 Sep 2021 13:46:52 -0400 Subject: [PATCH] Dockerfile - comment misused VOLUME instructions Issuing a VOLUME instruction in a production Dockerfile requires the Docker engine to create a volume whether or not it is mapped to the host or a named volume. Neither of these paths have data that needs to be persisted for production use, so their inclusion under a typical `docker run` example forces the engine to create extraneous volumes which quickly become orphaned whenever the container is recreated. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index dcfb030b..ea1a6ea3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -69,9 +69,9 @@ RUN ln -s /etc/shlink/bin/cli /usr/local/bin/shlink EXPOSE 8080 # Expose params config dir, since the user is expected to provide custom config from there -VOLUME /etc/shlink/config/params +#VOLUME /etc/shlink/config/params # Expose data dir to allow persistent runtime data and SQLite db -VOLUME /etc/shlink/data +#VOLUME /etc/shlink/data # Copy config specific for the image COPY docker/docker-entrypoint.sh docker-entrypoint.sh