-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile-apache
42 lines (32 loc) · 1.23 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
ARG PHP_VER_DOT
FROM jtreminio/php:$PHP_VER_DOT
LABEL maintainer="Juan Treminio <[email protected]>"
RUN printf "deb [arch=amd64] http://ppa.launchpad.net/ondrej/apache2/ubuntu bionic main\n" \
>/etc/apt/sources.list.d/ondrej-apache2.list &&\
apt-get update &&\
apt-get install --no-install-recommends --no-install-suggests -y \
apache2 &&\
apt-get -y --purge autoremove &&\
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/{man,doc}
RUN a2enmod env headers proxy proxy_http proxy_fcgi rewrite
# Set proper permissions for Apache
RUN chown -R www-data:www-data \
/var/www &&\
rm -rf /var/www/html
COPY files/apache/ports.conf /etc/apache2/ports.conf
COPY files/apache/vhost/* /etc/apache2/sites-available/
RUN rm -f /etc/apache2/sites-enabled/000-default.conf
# runit config
RUN mkdir /etc/service/apache
COPY files/apache/apache /etc/service/apache/run
RUN chmod +x /etc/service/apache/run
RUN mkdir /etc/service/fpm-xdebug
COPY files/php/fpm-xdebug /etc/service/fpm-xdebug/run
RUN chmod +x /etc/service/fpm-xdebug/run &&\
touch /var/log/fpm-xdebug-tail
# Default Apache vhost to basic FPM config
ENV VHOST=fpm
# Replace 0.0.0.0:9000
ENV FPM.listen="127.0.0.1:9000"
EXPOSE 8080
CMD ["/sbin/my_init"]