-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.apache
48 lines (39 loc) · 1.83 KB
/
Dockerfile.apache
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
42
43
44
45
46
47
48
@GENERATED_WARNING@
FROM php:@DOCKER_FROM_TAG@
MAINTAINER Paweł Tomulik <ptomulik@@meil.pw.edu.pl>
@DOCKER_PHP_ARGS@
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.name="Docker PHP+Apache Image" \
org.label-schema.description="Docker image with PHP and Apache for Korowai project." \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vcs-url="https://github.com/korowai/docker-php" \
org.label-schema.vendor="Paweł Tomulik" \
org.label-schema.version="${VERSION}" \
org.label-schema.schema-version="1.0"
@DOCKER_PHP_ENV@
RUN apt-get update && \
apt-get install -y --no-install-recommends \
unzip \
libldap2-dev \
libsasl2-dev \
ssl-cert && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
curl -L https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
curl -L https://github.com/jwilder/dockerize/releases/download/v0.6.0/dockerize-linux-amd64-v0.6.0.tar.gz \
--output /tmp/dockerize-linux-amd64-v0.6.0.tar.gz && \
tar -C /usr/local/bin -zxvf /tmp/dockerize-linux-amd64-v0.6.0.tar.gz && \
rm -f /tmp/dockerize-linux-amd64-v0.6.0.tar.gz && \
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu --with-ldap-sasl && \
docker-php-ext-install ldap
ENV APACHE_DOCUMENT_ROOT /var/www/html
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf && \
sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf && \
sed -ri -e 's!^\s*(</VirtualHost>)\s*$!\tAllowEncodedSlashes NoDecode\n\1!' /etc/apache2/sites-available/*.conf && \
a2enmod rewrite && \
a2enmod ssl && \
a2ensite default-ssl
# vim: set ft=dockerfile: