Merge pull request #1108 from kanadaj/develop

Change the Docker user to non-root
This commit is contained in:
Alejandro Celaya 2021-07-15 20:19:42 +02:00 committed by GitHub
commit 8efda2ef56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,4 +78,13 @@ COPY docker/docker-entrypoint.sh docker-entrypoint.sh
COPY docker/config/shlink_in_docker.local.php config/autoload/shlink_in_docker.local.php COPY docker/config/shlink_in_docker.local.php config/autoload/shlink_in_docker.local.php
COPY docker/config/php.ini ${PHP_INI_DIR}/conf.d/ 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
ENTRYPOINT ["/bin/sh", "./docker-entrypoint.sh"] ENTRYPOINT ["/bin/sh", "./docker-entrypoint.sh"]