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.
This commit is contained in:
Nick Reilingh 2021-09-11 13:46:52 -04:00 committed by GitHub
parent b0d33f3a85
commit 14c6ead389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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