diff --git a/Dockerfile b/Dockerfile index ba15bc8..c29dedf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN rm -rf /etc/apt/apt.conf.d/docker-gzip-indexes \ && apt-get update \ && apt-get install -y bind9 perl libnet-ssleay-perl openssl \ libauthen-pam-perl libpam-runtime libio-pty-perl \ - apt-show-versions python pwgen \ + apt-show-versions python \ && wget "http://prdownloads.sourceforge.net/webadmin/webmin_${WEBMIN_VERSION}_all.deb" -P /tmp/ \ && dpkg -i /tmp/webmin_${WEBMIN_VERSION}_all.deb \ && rm -rf /tmp/webmin_${WEBMIN_VERSION}_all.deb \ diff --git a/entrypoint.sh b/entrypoint.sh index 83100b8..0c3f24b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,8 @@ #!/bin/bash set -e +ROOT_PASSWORD=${ROOT_PASSWORD:-password} + # script variables BIND_DATA_DIR=${DATA_DIR}/bind WEBMIN_DATA_DIR=${DATA_DIR}/webmin @@ -44,11 +46,7 @@ if [ "${WEBMIN_ENABLED}" == "true" ]; then rm -rf /etc/webmin ln -sf ${WEBMIN_DATA_DIR}/etc /etc/webmin - # generate a random password for root - if [ -z "${ROOT_PASSWORD}" ]; then - ROOT_PASSWORD=$(pwgen -c -n -1 12) - echo User: root Password: $ROOT_PASSWORD - fi + # set root user password echo "root:$ROOT_PASSWORD" | chpasswd echo "Starting webmin..."