-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.debug
More file actions
41 lines (35 loc) · 1.18 KB
/
Dockerfile.debug
File metadata and controls
41 lines (35 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM kaz29/php-apache:7.2.8
ENV APACHE_CONFDIR /etc/apache2
ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars
ENV COMPOSER_HOME /usr/local
ARG HOST_PORT
ARG DOCUMENT_ROOT
ENV HOST_PORT "$HOST_PORT"
ENV DOCUMENT_ROOT "$DOCUMENT_ROOT"
COPY config/001-app.conf /etc/apache2/sites-available/000-default.conf
COPY config/ports.conf /etc/apache2/ports.conf
COPY config/apc.ini /usr/local/etc/php/conf.d/
RUN set -ex \
# append apache envver
&& echo "export HOST_PORT=$HOST_PORT" >> "$APACHE_ENVVARS" \
&& echo "export DOCUMENT_ROOT=$DOCUMENT_ROOT" >> "$APACHE_ENVVARS" \
# setup apache envvers
&& sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS" \
&& . "$APACHE_ENVVARS" \
# install php modules
&& pecl install redis \
&& pecl install apcu \
&& docker-php-ext-enable redis \
&& docker-php-ext-enable apcu \
# link application logfile to stdio
&& ln -sfT /dev/stderr "$APACHE_LOG_DIR/app-error.log" \
&& ln -sfT /dev/stdout "$APACHE_LOG_DIR/app-access.log" \
# enable module/site
&& a2enmod rewrite \
# && a2ensite 001-app \
# install composer
&& { \
curl -sS https://getcomposer.org/installer; \
} | php \
&& mv composer.phar /usr/local/bin/composer
EXPOSE $HOST_PORT