44 lines
947 B
Docker
Executable file
44 lines
947 B
Docker
Executable file
FROM php:7.4-apache
|
|
|
|
# Install extensions
|
|
RUN apt-get update && apt-get install -y \
|
|
libfreetype6-dev \
|
|
libjpeg62-turbo-dev \
|
|
libpng-dev \
|
|
&& docker-php-ext-install -j$(nproc) iconv \
|
|
&& docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \
|
|
&& docker-php-ext-install -j$(nproc) gd
|
|
|
|
# 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 environment variabiles defaults
|
|
|
|
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
|
|
|
|
# Final touches
|
|
|
|
EXPOSE 80
|
|
CMD ["bash", "/entrypoint.sh"]
|