-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
Dockerfile.alpine
executable file
·59 lines (48 loc) · 1.41 KB
/
Dockerfile.alpine
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
49
50
51
52
53
54
55
56
57
58
59
FROM php:8-alpine
# Install extensions
RUN apk add --quiet --no-cache \
bash \
apache2 \
apache2-ssl \
php83-apache2 \
php83-ctype \
php83-openssl \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
libpq-dev \
&& docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-install -j$(nproc) gd pdo pdo_mysql pdo_pgsql pgsql \
&& rm -f /usr/src/php.tar.xz /usr/src/php.tar.xz.asc \
&& apk del --quiet --no-cache \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
libpq-dev
RUN ln -sf /dev/stdout /var/log/apache2/access.log && \
ln -sf /dev/stderr /var/log/apache2/error.log
# Prepare files and folders
RUN mkdir -p /speedtest/
# Copy sources
COPY backend/ /speedtest/backend
COPY results/*.php /speedtest/results/
COPY results/*.ttf /speedtest/results/
COPY *.js /speedtest/
COPY favicon.ico /speedtest/
COPY docker/servers.json /servers.json
COPY docker/*.php /speedtest/
COPY docker/entrypoint.sh /
# Prepare default environment variables
ENV TITLE=LibreSpeed
ENV MODE=standalone
ENV PASSWORD=password
ENV TELEMETRY=false
ENV ENABLE_ID_OBFUSCATION=false
ENV REDACT_IP_ADDRESSES=false
ENV WEBPORT=80
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
# Final touches
EXPOSE 80
CMD ["bash", "/entrypoint.sh"]