Skip to content

Commit 1364405

Browse files
committed
docker: update Dockerfile to use specific PHP version, added librespeed, added iperf and improve cleanup
1 parent 3bd7f88 commit 1364405

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

Dockerfile

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,51 @@
11
#############################
22
# Base image
33
#############################
4-
FROM serversideup/php:8.4-fpm-nginx-alpine AS base
4+
FROM serversideup/php:8.4-fpm-nginx-alpine-v4.2.1 AS base
55

66
LABEL org.opencontainers.image.title="speedtest-tracker-docker" \
77
org.opencontainers.image.authors="Alex Justesen (@alexjustesen)"
88

9-
ARG CLI_VERSION="1.2.0" \
9+
ARG LIBRESPEED_CLI_VERSION="1.0.12" \
10+
OOKLA_CLI_VERSION="1.2.0" \
1011
RELEASE_TAG="latest"
1112

1213
ENV AUTORUN_ENABLED="true" \
1314
AUTORUN_LARAVEL_MIGRATION="true" \
1415
AUTORUN_LARAVEL_MIGRATION_ISOLATION="true" \
16+
PHP_MEMORY_LIMIT="512M" \
1517
PHP_OPCACHE_ENABLE="1" \
1618
SHOW_WELCOME_MESSAGE="false"
1719

1820
# Switch to root so we can do root things
1921
USER root
2022

23+
# Install jq for parsing GitHub API responses and iperf for network testing
24+
RUN apk add --no-cache jq iperf3
25+
26+
# Install LibreSpeed CLI
27+
RUN curl -o \
28+
/tmp/librespeed-cli.tgz -L \
29+
"https://github.com/librespeed/speedtest-cli/releases/download/v${LIBRESPEED_CLI_VERSION}/librespeed-cli_${LIBRESPEED_CLI_VERSION}_linux_amd64.tar.gz" && \
30+
tar xzf \
31+
/tmp/librespeed-cli.tgz -C \
32+
/usr/bin \
33+
&& rm /tmp/librespeed-cli.tgz
34+
35+
2136
# Install Speedtest CLI
2237
RUN curl -o \
2338
/tmp/speedtest-cli.tgz -L \
24-
"https://install.speedtest.net/app/cli/ookla-speedtest-${CLI_VERSION}-linux-x86_64.tgz" && \
39+
"https://install.speedtest.net/app/cli/ookla-speedtest-${OOKLA_CLI_VERSION}-linux-x86_64.tgz" && \
2540
tar xzf \
2641
/tmp/speedtest-cli.tgz -C \
27-
/usr/bin
42+
/usr/bin \
43+
&& rm /tmp/speedtest-cli.tgz
2844

2945
# Install the intl extension with root permissions
30-
RUN install-php-extensions gd intl
46+
RUN install-php-extensions intl \
47+
&& rm -rf /var/cache/apk/* \
48+
&& rm -rf /tmp/*
3149

3250
# Drop back to our unprivileged user
3351
USER www-data

0 commit comments

Comments
 (0)