-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (27 loc) · 1.17 KB
/
Dockerfile
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 alpine:3.15
# Install required packages
RUN apk update && \
apk add apache2-ssl apache2-ctl && \
apk add php7 php7-apache2 php7-gd php7-pdo_mysql php7-json php7-xml php7-mbstring php7-session php7-curl php7-simplexml php7-ctype php7-dom php7-iconv php7-xmlwriter php7-tokenizer php7-fileinfo php7-xmlreader php7-zip && \
apk add php7-pecl-xdebug && \
apk add wait4ports && \
apk add mariadb-client && \
apk add curl && \
apk add python3 py3-mysqlclient && \
apk add tar bzip2 unzip
# Remap apache to port 8443
RUN sed -i -re "s/443/8443/gi" /etc/apache2/conf.d/ssl.conf
# Enable elgg htaccess modifications
RUN sed -i -re "s/AllowOverride None/AllowOverride All/gi" /etc/apache2/httpd.conf
# Enable rewrite module
RUN sed -i -re "s/^#LoadModule rewrite_module(.*)/LoadModule rewrite_module\1/gi" /etc/apache2/httpd.conf
# Enable xdebug
RUN rm /etc/php7/conf.d/*xdebug*
COPY xdebug.ini /etc/php7/xdebug.ini
COPY xdebugctl.sh /usr/local/bin
RUN chmod +x /usr/local/bin/xdebugctl.sh
# Install entrypoint script
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
EXPOSE 80 8443
ENTRYPOINT [ "/docker-entrypoint.sh" ]