@ -4,6 +4,7 @@ MAINTAINER Johannes Schickling "schickling.j@gmail.com"
RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
openssl \
ca-certificates \
nginx-extras \
python-pip \
@ -8,4 +8,9 @@ else
envtpl /etc/nginx/nginx.conf.tpl
fi
if [[ ! -z $NGINX_AUTH_BASIC_USER && ! -z $NGINX_AUTH_BASIC_PASSWORD ]]; then
echo -n "$NGINX_AUTH_BASIC_USER:" > /etc/nginx/.htpasswd
openssl passwd -apr1 $NGINX_AUTH_BASIC_PASSWORD >> /etc/nginx/.htpasswd
exec "$@"