Skip to content

Commit

Permalink
build: update Dockerfile (#815)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiio authored Aug 9, 2024
1 parent f0fa199 commit dad3e55
Showing 1 changed file with 11 additions and 45 deletions.
56 changes: 11 additions & 45 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ RUN npm run build

FROM php:8.2-fpm-alpine

ARG S6_OVERLAY_VERSION=3.1.6.2
ARG S6_OVERLAY_VERSION=3.2.0.0

ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz

COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/

ENTRYPOINT ["/init"]

COPY docker/openssl/openssl.cnf /etc/ssl/openssl.cnf
Expand All @@ -37,52 +39,22 @@ COPY docker/php/www.conf /usr/local/etc/php-fpm.d/zz-docker.conf
COPY docker/s6-rc.d /etc/s6-overlay/s6-rc.d

RUN apk update && \
# build dependencies
apk add --no-cache --virtual .build-deps \
bzip2-dev \
curl-dev \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
libwebp-dev \
libxml2-dev \
libzip-dev \
postgresql-dev \
zlib-dev \
zip && \
#
# production dependencies
# dependencies
apk add --no-cache \
icu-libs \
libjpeg-turbo \
libpng \
libwebp \
libzip \
nginx \
php-pgsql && \
#
# configure extensions
docker-php-ext-configure gd --enable-gd --with-jpeg --with-webp && \
#
# install redis
pecl install redis && \
docker-php-ext-enable redis && \
nginx && \
#
# install extensions
docker-php-ext-install \
install-php-extensions \
bcmath \
curl \
dom \
fileinfo \
event \
excimer \
exif \
gd \
intl \
opcache \
pdo_pgsql \
simplexml \
zip && \
#
# cleanup
apk del -f .build-deps
pcntl \
zip

ENV COMPOSER_ALLOW_SUPERUSER 1

Check warning on line 59 in Dockerfile

View workflow job for this annotation

GitHub Actions / build / Build and push image to registry

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV COMPOSER_HOME /tmp

Check warning on line 60 in Dockerfile

View workflow job for this annotation

GitHub Actions / build / Build and push image to registry

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
Expand All @@ -106,12 +78,6 @@ RUN composer install \
--no-dev \
--prefer-dist

ENV APP_ENV production
ENV APP_DEBUG false
ENV LOG_CHANNEL stderr

Check warning on line 81 in Dockerfile

View workflow job for this annotation

GitHub Actions / build / Build and push image to registry

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

ENV WEBSITE_FACTORY_EDITION ong

ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME 0

EXPOSE 80

0 comments on commit dad3e55

Please sign in to comment.