From 377562cdff8e0f4eb83975e8f7c7233ddd253408 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 1 Aug 2021 08:55:39 +0200 Subject: [PATCH] Disabled user change on Dockerfile, as it produces some issues --- Dockerfile | 15 ++++++++------- docker/docker-entrypoint.sh | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index e327c092..309970ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -79,12 +79,13 @@ COPY docker/config/shlink_in_docker.local.php config/autoload/shlink_in_docker.l COPY docker/config/php.ini ${PHP_INI_DIR}/conf.d/ # Change the ownership of /etc/shlink/data to be writable, then change the user to non-root -RUN chown 1001 /etc/shlink/data -RUN chown 1001 /etc/shlink/data/locks -RUN chown 1001 /etc/shlink/data/proxies -RUN chown 1001 /etc/shlink/data/cache -RUN chown 1001 /etc/shlink/data/log - -USER 1001 +# FIXME Disabled for now, as it conflicts with ENABLE_PERIODIC_VISIT_LOCATE, which is used to configure a cron as root. +# Ref: https://github.com/shlinkio/shlink/issues/1132 +#RUN chown 1001 /etc/shlink/data +#RUN chown 1001 /etc/shlink/data/locks +#RUN chown 1001 /etc/shlink/data/proxies +#RUN chown 1001 /etc/shlink/data/cache +#RUN chown 1001 /etc/shlink/data/log +#USER 1001 ENTRYPOINT ["/bin/sh", "./docker-entrypoint.sh"] diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 915c5f83..8847b757 100644 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -25,7 +25,7 @@ fi # https://shlink.io/documentation/long-running-tasks/#locate-visits # set env var "ENABLE_PERIODIC_VISIT_LOCATE=true" to enable if [ $ENABLE_PERIODIC_VISIT_LOCATE ]; then - echo "Starting periodic visite locate..." + echo "Configuring periodic visit locate..." echo "0 * * * * php /etc/shlink/bin/cli visit:locate -q" > /etc/crontabs/root /usr/sbin/crond & fi