take ownership of /opt/factorio/temp

This commit is contained in:
David Andersen 2019-02-27 18:25:54 +00:00
parent 324920cdf8
commit 10d000408c
2 changed files with 7 additions and 1 deletions

View File

@ -34,6 +34,10 @@ RUN mkdir -p /opt /factorio && \
addgroup -g $PGID -S $GROUP && \
adduser -u $PUID -G $GROUP -s /bin/sh -SDH $USER && \
chown -R $USER:$GROUP /opt/factorio /factorio
# mkdir -p /opt/factorio/temp && \
# chmod 777 -R /opt/factorio/temp && \
# mkdir -p /opt/factorio/temp && \
# chmod 777 -R /opt/factorio/temp && \
VOLUME /factorio

View File

@ -47,7 +47,9 @@ fi
if [ "$(id -u)" = '0' ]; then
# Take ownership of factorio data if running as root
chown -R factorio:factorio $FACTORIO_VOL
# We want to drop to the factorio user
# Make sure we own temp
chown -R factorio:factorio /opt/factorio/temp
# Drop to the factorio user
SU_EXEC="su-exec factorio"
fi