Add SKIP_NSSWITCH_CONF option

For #416
This commit is contained in:
Geoff Bourne 2019-11-26 21:34:56 -06:00
parent b401873298
commit 94b037428e
2 changed files with 4 additions and 2 deletions

View file

@ -29,8 +29,6 @@ RUN addgroup -g 1000 minecraft \
EXPOSE 25565 25575 EXPOSE 25565 25575
RUN echo 'hosts: files dns' > /etc/nsswitch.conf
ARG ARCH=amd64 ARG ARCH=amd64
ARG EASY_ADD_VER=0.3.0 ARG EASY_ADD_VER=0.3.0

4
start
View file

@ -16,6 +16,10 @@ if [ $(id -u) = 0 ]; then
chown -R minecraft:minecraft /data chown -R minecraft:minecraft /data
fi fi
if [[ ${SKIP_NSSWITCH_CONF^^} != TRUE ]]; then
echo 'hosts: files dns' > /etc/nsswitch.conf
fi
exec su-exec minecraft:minecraft /start-configuration $@ exec su-exec minecraft:minecraft /start-configuration $@
else else
exec /start-configuration $@ exec /start-configuration $@