furaolink/Dockerfile
J. Scott Elblein 4f7443dc54 Several changes
Closes:
https://github.com/JulianPrieber/llc-docker/issues/11

+ Healthcheck Log Spam hidden.
+ FQDN Warning fixed.
+ Access+ Logs now also shown in the container log.
+ More logical container entry path.
+ Timezone fixed in log info (added tzdata).
+ docker-entrypoint.sh moved to bin path, so it can be called from anywhere, rather than only the root dir.
2022-10-14 00:11:13 -05:00

60 lines
1.5 KiB
Docker

FROM alpine:3.16
LABEL maintainer="JulianPrieber"
LABEL description="LittleLink Custom Docker"
# Setup apache and php
RUN apk --no-cache --update \
add apache2 \
apache2-ssl \
curl \
php8-apache2 \
php8-bcmath \
php8-bz2 \
php8-calendar \
php8-common \
php8-ctype \
php8-curl \
php8-dom \
php8-fileinfo \
php8-gd \
php8-iconv \
php8-json \
php8-mbstring \
php8-mysqli \
php8-mysqlnd \
php8-openssl \
php8-pdo_mysql \
php8-pdo_pgsql \
php8-pdo_sqlite \
php8-phar \
php8-session \
tzdata \
php8-xml \
php8-tokenizer \
php8-zip \
&& mkdir /htdocs
COPY littlelink-custom /htdocs
RUN chown -R apache:apache /htdocs
RUN find /htdocs -type d -print0 | xargs -0 chmod 0755
RUN find /htdocs -type f -print0 | xargs -0 chmod 0644
EXPOSE 80 443
COPY --chmod=755 docker-entrypoint.sh /usr/local/bin/
HEALTHCHECK CMD curl -f http://localhost -A "HealthCheck" || exit 1
# Forward Apache access and error logs to Docker's log collector.
# Optional last line adds extra verbosity with for example:
# [ssl:info] [pid 33] [client 10.0.5.8:45542] AH01964: Connection to child 2 established (server your.domain:443)
RUN ln -sf /dev/stdout /var/www/logs/access.log \
&& ln -sf /dev/stderr /var/www/logs/error.log \
&& ln -sf /dev/stderr /var/www/logs/ssl-access.log
# && ln -sf /dev/stderr /var/www/logs/ssl-error.log
# Set console entry path
WORKDIR /htdocs/littlelink
CMD ["docker-entrypoint.sh"]