Commit 06ef5f3c authored by Jon Pugh's avatar Jon Pugh

Set www-data UID.

parent 2023cf74
FROM ubuntu:14.04
RUN apt-get -qq -o Dpkg::Use-Pty=0 update && DEBIAN_FRONTEND=noninteractive apt-get -qq -o Dpkg::Use-Pty=0 install \
apache2 \
php5 \
php5-cli \
php5-gd \
php5-mysql \
php-pear \
php5-curl \
postfix \
sudo \
rsync \
git-core \
unzip \
wget \
mysql-client
# Use --build-arg option when running docker build to set these variables.
# If wish to "mount" a volume to your host, set AEGIR_UID and AEGIR_GID to your local user's UID.
# There are both ARG and ENV lines to make sure the value persists.
......@@ -25,6 +9,9 @@ RUN apt-get -qq -o Dpkg::Use-Pty=0 update && DEBIAN_FRONTEND=noninteractive apt-
ARG AEGIR_UID=1000
ENV AEGIR_UID ${AEGIR_UID:-1000}
ARG APACHE_UID=10000
ENV APACHE_UID ${APACHE_UID:-10000}
# The home directory for the aegir user.
ARG AEGIR_ROOT=/var/aegir
ENV AEGIR_ROOT ${AEGIR_ROOT:-/var/aegir}
......@@ -33,11 +20,32 @@ ENV AEGIR_ROOT ${AEGIR_ROOT:-/var/aegir}
ARG AEGIR_SERVER_NAME=server_master
ENV AEGIR_SERVER_NAME ${AEGIR_SERVER_NAME:-server_master}
RUN echo "Changing user www-data to UID $APACHE_UID and GID $APACHE_UID..."
RUN usermod -u $APACHE_UID www-data
RUN groupmod -g $APACHE_UID www-data
RUN apt-get -qq -o Dpkg::Use-Pty=0 update && DEBIAN_FRONTEND=noninteractive apt-get -qq -o Dpkg::Use-Pty=0 install \
apache2 \
php5 \
php5-cli \
php5-gd \
php5-mysql \
php-pear \
php5-curl \
postfix \
sudo \
rsync \
git-core \
unzip \
wget \
mysql-client
RUN echo "Creating user aegir with UID $AEGIR_UID and GID $AEGIR_GID and HOME $AEGIR_ROOT ..."
RUN addgroup --gid $AEGIR_UID aegir
RUN adduser --uid $AEGIR_UID --gid $AEGIR_UID --system --home $AEGIR_ROOT aegir
RUN adduser aegir www-data
RUN a2enmod rewrite
# Save a symlink to the /var/aegir/config/docker.conf file.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment