entrypoint.sh: set the default root password to `password`

pull/11/head
Sameer Naik 2015-07-21 13:37:22 +05:30
parent 8b4b18c709
commit 7ae7e22bdb
2 changed files with 4 additions and 6 deletions

View File

@ -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 \

View File

@ -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..."