2025-01-01 06:35:58 +00:00
|
|
|
FROM dunglas/frankenphp:latest-php8.3-alpine
|
|
|
|
|
|
|
|
# Base
|
|
|
|
RUN apk add --no-cache bash
|
|
|
|
|
|
|
|
# Additional extensions:
|
|
|
|
RUN install-php-extensions \
|
|
|
|
ldap \
|
|
|
|
memcached
|
|
|
|
|
|
|
|
RUN curl -4 https://getcomposer.org/installer|php -- --install-dir=/usr/local/bin --filename=composer
|
|
|
|
ENV COMPOSER_HOME=/var/cache/composer
|
|
|
|
|
|
|
|
ENV SITE_USER=www-data
|
|
|
|
|
2025-01-01 08:27:52 +00:00
|
|
|
COPY docker/init-docker /sbin/init-docker
|
2025-01-01 06:35:58 +00:00
|
|
|
RUN chmod 550 /sbin/init-docker && chown ${SITE_USER}:0 /sbin/init-docker
|
2023-01-30 11:37:35 +00:00
|
|
|
|
|
|
|
COPY . /var/www/html/
|
2025-01-01 06:35:58 +00:00
|
|
|
WORKDIR /var/www/html
|
|
|
|
|
|
|
|
RUN mkdir -p ${COMPOSER_HOME} \
|
|
|
|
&& ([ -r auth.json ] && mv auth.json ${COMPOSER_HOME}) || true \
|
|
|
|
&& touch .composer.refresh \
|
|
|
|
&& mv .env.example .env \
|
|
|
|
&& FORCE_PERMS=1 /sbin/init-docker \
|
|
|
|
&& rm -rf ${COMPOSER_HOME}/* composer.lock
|
|
|
|
|
|
|
|
# Fix start up items
|
|
|
|
RUN sed -i -e 's/^{$CADDY_EXTRA_CONFIG}$/{$CADDY_EXTRA_CONFIG} /' /etc/caddy/Caddyfile
|
|
|
|
RUN chown ${SITE_USER} /config/caddy /data/caddy
|
|
|
|
|
|
|
|
USER ${SITE_USER}
|
2023-01-30 11:37:35 +00:00
|
|
|
|
2025-01-01 06:35:58 +00:00
|
|
|
# Control which port to open
|
|
|
|
ENV SERVER_NAME=:8080
|
|
|
|
EXPOSE 8080
|