mirror of
https://gitlab.com/alemaire/buildx.git
synced 2025-01-10 18:43:29 +00:00
Update Dockerfile
This commit is contained in:
parent
2f0862d098
commit
b807cc60bc
@ -1,4 +1,6 @@
|
||||
FROM debian:buster-20210208-slim
|
||||
ENV APACHE_CONFDIR /etc/apache2
|
||||
ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars
|
||||
RUN set -ex; \
|
||||
apt-get update -qqy; \
|
||||
apt-get install -qqy --no-install-recommends \
|
||||
@ -21,9 +23,45 @@ RUN set -ex; \
|
||||
libc-l10n \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*; \
|
||||
a2enmod rewrite; \
|
||||
a2dismod mpm_event && a2enmod mpm_prefork && a2enmod rewrite; \
|
||||
mkdir -p /etc/ssl/certs; \
|
||||
curl -fLSko /etc/ssl/certs/cacert.pem https://curl.se/ca/cacert.pem
|
||||
curl -fLSko /etc/ssl/certs/cacert.pem https://curl.se/ca/cacert.pem; \
|
||||
sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS"; \
|
||||
\
|
||||
. "$APACHE_ENVVARS"; \
|
||||
for dir in \
|
||||
"$APACHE_LOCK_DIR" \
|
||||
"$APACHE_RUN_DIR" \
|
||||
"$APACHE_LOG_DIR" \
|
||||
; do \
|
||||
rm -rvf "$dir"; \
|
||||
mkdir -p "$dir"; \
|
||||
chown "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$dir"; \
|
||||
chmod 777 "$dir"; \
|
||||
done; \
|
||||
\
|
||||
rm -rvf /var/www/html/*; \
|
||||
chmod 777 /var/www/html; \
|
||||
\
|
||||
# logs should go to stdout / stderr
|
||||
ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log"; \
|
||||
ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log"; \
|
||||
ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log"; \
|
||||
chown -R --no-dereference "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$APACHE_LOG_DIR"; \
|
||||
{ \
|
||||
echo '<FilesMatch \.php$>'; \
|
||||
echo '\tSetHandler application/x-httpd-php'; \
|
||||
echo '</FilesMatch>'; \
|
||||
echo; \
|
||||
echo 'DirectoryIndex disabled'; \
|
||||
echo 'DirectoryIndex index.php index.html'; \
|
||||
echo; \
|
||||
echo '<Directory /var/www/>'; \
|
||||
echo '\tOptions -Indexes'; \
|
||||
echo '\tAllowOverride All'; \
|
||||
echo '</Directory>'; \
|
||||
} | tee "$APACHE_CONFDIR/conf-available/docker-php.conf" \
|
||||
&& a2enconf docker-php
|
||||
|
||||
ENV CURL_CA_BUNDLE=/etc/ssl/certs/cacert.pem \
|
||||
SSL_CERT_FILE=/etc/ssl/certs/cacert.pem
|
||||
|
Loading…
Reference in New Issue
Block a user