|
@@ -20,6 +20,17 @@ RUN apk add --quiet --no-cache \
|
|
|
RUN ln -sf /dev/stdout /var/log/apache2/access.log && \
|
|
RUN ln -sf /dev/stdout /var/log/apache2/access.log && \
|
|
|
ln -sf /dev/stderr /var/log/apache2/error.log
|
|
ln -sf /dev/stderr /var/log/apache2/error.log
|
|
|
|
|
|
|
|
|
|
+# Install the ini into the scan dir PHP itself reports.
|
|
|
|
|
+COPY docker/librespeed-php.ini /tmp/librespeed-php.ini
|
|
|
|
|
+RUN set -eu; \
|
|
|
|
|
+ scan_dir="$(php -r 'echo rtrim(PHP_CONFIG_FILE_SCAN_DIR);')"; \
|
|
|
|
|
+ if [ -z "$scan_dir" ]; then \
|
|
|
|
|
+ echo "ERROR: PHP_CONFIG_FILE_SCAN_DIR is empty" >&2; \
|
|
|
|
|
+ exit 1; \
|
|
|
|
|
+ fi; \
|
|
|
|
|
+ install -m 0644 /tmp/librespeed-php.ini "$scan_dir/99-librespeed.ini"; \
|
|
|
|
|
+ rm /tmp/librespeed-php.ini
|
|
|
|
|
+
|
|
|
# Prepare files and folders
|
|
# Prepare files and folders
|
|
|
RUN mkdir -p /speedtest/
|
|
RUN mkdir -p /speedtest/
|
|
|
|
|
|