Changed container user and group

This commit is contained in:
tms 2023-09-25 17:27:17 +02:00
parent c0e6d0848f
commit 731eae884c
1 changed files with 10 additions and 5 deletions

View File

@ -43,11 +43,16 @@ RUN unzip omeka-s-4.0.4.zip -d /var/www/html/ && rm omeka-s-4.0.4.zip
##COPY config/database.ini /var/www/html/omeka-s/config/database.ini
# Make sure files/folders needed by the processes are accessable when they run under the nobody user
RUN chown -R nobody.nobody /var/www/html && \
chown -R nobody.nobody /run && \
chown -R nobody.nobody /var/lib/nginx && \
chown -R nobody.nobody /var/log/nginx && \
chown -R nobody.nobody /var/log/php82
# Create docker user and group of id's 1000
RUN addgroup -S dockergroup -u 1000 && adduser -S dockeruser -u 1000 -G dockergroup
RUN chown -R 1000:1000 /var/www/html && \
chown -R 1000:1000 /run && \
chown -R 1000:1000 /var/lib/nginx && \
chown -R 1000:1000 /var/log/nginx && \
chown -R 1000:1000 /var/log/php82
# Change to Omeka-s base dir