Drop build dependencies from Alpine variant (#152)

This commit is contained in:
J0WI
2023-06-09 10:03:35 +00:00
committed by GitHub
parent 23e6fa6f88
commit 0c28e5bbf9
3 changed files with 64 additions and 27 deletions

View File

@@ -2,6 +2,10 @@ FROM docker.io/php:8.0-fpm-alpine
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
# Install OS dependencies # Install OS dependencies
RUN apk add --no-cache netcat-openbsd bash
# Install PHP Plugins
# hadolint ignore=DL3019
RUN set -ex; \ RUN set -ex; \
apk add --no-cache --virtual .build-deps \ apk add --no-cache --virtual .build-deps \
freetype-dev \ freetype-dev \
@@ -13,14 +17,13 @@ RUN set -ex; \
openldap-dev \ openldap-dev \
oniguruma-dev \ oniguruma-dev \
imap-dev \ imap-dev \
postgresql-dev && \ postgresql-dev \
apk add --no-cache netcat-openbsd bash ; \
\
# Install PHP Plugins docker-php-ext-configure gd --with-freetype --with-jpeg; \
RUN set -ex; \ docker-php-ext-configure imap --with-imap-ssl; \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr && \ docker-php-ext-install -j "$(nproc)" \
docker-php-ext-configure imap --with-imap-ssl && \ exif \
docker-php-ext-install \
gd \ gd \
imap \ imap \
ldap \ ldap \
@@ -31,7 +34,17 @@ RUN set -ex; \
pgsql \ pgsql \
sodium \ sodium \
tidy \ tidy \
zip zip \
; \
\
runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --no-network --virtual .limesurvey-phpext-rundeps $runDeps; \
apk del --no-network .build-deps
ARG version="3.28.56+230404" ARG version="3.28.56+230404"
ARG sha256_checksum="abfdc800d97feabbd448df4a2cfa72a954d2f6b013475132b0691ac2563e7228" ARG sha256_checksum="abfdc800d97feabbd448df4a2cfa72a954d2f6b013475132b0691ac2563e7228"

View File

@@ -2,6 +2,10 @@ FROM docker.io/php:8.0-fpm-alpine
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
# Install OS dependencies # Install OS dependencies
RUN apk add --no-cache netcat-openbsd bash
# Install PHP Plugins
# hadolint ignore=DL3019
RUN set -ex; \ RUN set -ex; \
apk add --no-cache --virtual .build-deps \ apk add --no-cache --virtual .build-deps \
freetype-dev \ freetype-dev \
@@ -13,14 +17,12 @@ RUN set -ex; \
openldap-dev \ openldap-dev \
oniguruma-dev \ oniguruma-dev \
imap-dev \ imap-dev \
postgresql-dev && \ postgresql-dev \
apk add --no-cache netcat-openbsd bash ; \
\
# Install PHP Plugins docker-php-ext-configure gd --with-freetype --with-jpeg; \
RUN set -ex; \ docker-php-ext-configure imap --with-imap-ssl; \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr && \ docker-php-ext-install -j "$(nproc)" \
docker-php-ext-configure imap --with-imap-ssl && \
docker-php-ext-install \
exif \ exif \
gd \ gd \
imap \ imap \
@@ -32,7 +34,17 @@ RUN set -ex; \
pgsql \ pgsql \
sodium \ sodium \
tidy \ tidy \
zip zip \
; \
\
runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --no-network --virtual .limesurvey-phpext-rundeps $runDeps; \
apk del --no-network .build-deps
ARG version="5.6.21+230518" ARG version="5.6.21+230518"
ARG sha256_checksum="47ae13c225b7986e65913e3d2206fd53a7acf511166d2d1a73b5257830eacfef" ARG sha256_checksum="47ae13c225b7986e65913e3d2206fd53a7acf511166d2d1a73b5257830eacfef"

View File

@@ -2,6 +2,10 @@ FROM docker.io/php:8.1-fpm-alpine
LABEL maintainer="markus@martialblog.de" LABEL maintainer="markus@martialblog.de"
# Install OS dependencies # Install OS dependencies
RUN apk add --no-cache netcat-openbsd bash
# Install PHP Plugins
# hadolint ignore=DL3019
RUN set -ex; \ RUN set -ex; \
apk add --no-cache --virtual .build-deps \ apk add --no-cache --virtual .build-deps \
freetype-dev \ freetype-dev \
@@ -13,14 +17,12 @@ RUN set -ex; \
openldap-dev \ openldap-dev \
oniguruma-dev \ oniguruma-dev \
imap-dev \ imap-dev \
postgresql-dev && \ postgresql-dev \
apk add --no-cache netcat-openbsd bash ; \
\
# Install PHP Plugins docker-php-ext-configure gd --with-freetype --with-jpeg; \
RUN set -ex; \ docker-php-ext-configure imap --with-imap-ssl; \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr && \ docker-php-ext-install -j "$(nproc)" \
docker-php-ext-configure imap --with-imap-ssl && \
docker-php-ext-install \
exif \ exif \
gd \ gd \
imap \ imap \
@@ -32,7 +34,17 @@ RUN set -ex; \
pgsql \ pgsql \
sodium \ sodium \
tidy \ tidy \
zip zip \
; \
\
runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --no-network --virtual .limesurvey-phpext-rundeps $runDeps; \
apk del --no-network .build-deps
ARG version="6.0.7+230515" ARG version="6.0.7+230515"
ARG sha256_checksum="de13467a4963d9759bd24300b5bd5b07f3149b0a62943180afaadfbd0513fef7" ARG sha256_checksum="de13467a4963d9759bd24300b5bd5b07f3149b0a62943180afaadfbd0513fef7"