diff --git a/Dockerfile b/Dockerfile index bf4a8549..8d900364 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,8 +29,6 @@ RUN addgroup -g 1000 minecraft \ EXPOSE 25565 25575 -RUN echo 'hosts: files dns' > /etc/nsswitch.conf - ARG ARCH=amd64 ARG EASY_ADD_VER=0.3.0 diff --git a/start b/start index d6c514bf..94a654fd 100644 --- a/start +++ b/start @@ -16,6 +16,10 @@ if [ $(id -u) = 0 ]; then chown -R minecraft:minecraft /data fi + if [[ ${SKIP_NSSWITCH_CONF^^} != TRUE ]]; then + echo 'hosts: files dns' > /etc/nsswitch.conf + fi + exec su-exec minecraft:minecraft /start-configuration $@ else exec /start-configuration $@