Files
FreshRSS/.devcontainer/Dockerfile
T
MoraxandAlexandre Alapetite 4023406fee Add Docker access log toggle (#9191)
* Add Docker access log toggle

Allow container operators to disable Apache access logging with DISABLE_ACCESS_LOG=1 while preserving the existing default.

* Use positive access log toggle

* Include dev container

* Better POSIX compatibility
```
  -E, -r, --regexp-extended
                 use extended regular expressions in the script
                 (for portability use POSIX -E).
```

Note: we should probably replace the other `sed -r` by `sed -E` elsewhere

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2026-08-14 23:40:47 +02:00

39 lines
1.4 KiB
Docker

FROM alpine:3.24
ENV TZ=UTC
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
RUN apk add --no-cache \
tzdata \
apache2 php-apache2 \
php php-curl php-gmp php-intl php-mbstring php-xml php-zip \
php-ctype php-dom php-fileinfo php-iconv php-json php-opcache php-openssl php-phar php-session php-simplexml php-xmlreader php-xmlwriter php-xml php-tokenizer php-zlib \
php-pdo_sqlite php-pdo_mysql php-pdo_pgsql \
bash composer curl docker-cli-buildx git gpg make nodejs npm shellcheck shfmt sudo
RUN \
# Disable unwanted Apache modules and configurations
rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \
/etc/apache2/conf.d/status.conf /etc/apache2/conf.d/userdir.conf && \
sed -r -i "/^\s*LoadModule .*mod_(alias|autoindex|negotiation|status).so$/s/^/#/" \
/etc/apache2/httpd.conf && \
sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" \
/etc/apache2/httpd.conf && \
# Enable required Apache modules
sed -r -i "/^\s*#\s*LoadModule .*mod_(deflate|expires|filter|headers|mime|remoteip|setenvif).so$/s/^\s*#//" \
/etc/apache2/httpd.conf
RUN adduser --ingroup www-data --disabled-password developer && \
echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer
ENV COPY_LOG_TO_SYSLOG=On
ENV COPY_SYSLOG_TO_STDERR=On
ENV CRON_MIN=''
ENV DATA_PATH=''
ENV ENABLE_ACCESS_LOG=1
ENV FRESHRSS_ENV='development'
ENV LISTEN='0.0.0.0:8080'
ENV TRUSTED_PROXY=0
EXPOSE 8080