Drop build dependencies from Debian variant (#153)

This commit is contained in:
J0WI
2023-06-09 11:14:20 +00:00
committed by GitHub
parent 6d3bc51ebc
commit 52ee67675a
6 changed files with 336 additions and 224 deletions

View File

@@ -3,48 +3,67 @@ LABEL maintainer="markus@martialblog.de"
# Install OS dependencies # Install OS dependencies
RUN set -ex; \ RUN set -ex; \
apt-get update && \ apt-get update; \
DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \
apt-get install --no-install-recommends -y \ netcat \
; \
\ \
libldap2-dev \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
libfreetype6-dev \
libjpeg-dev \
libonig-dev \
zlib1g-dev \
libc-client-dev \
libkrb5-dev \
libpng-dev \
libpq-dev \
libzip-dev \
libtidy-dev \
libsodium-dev \
netcat \
\
&& apt-get -y autoclean; apt-get -y autoremove; \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Link LDAP library for PHP ldap extension
RUN set -ex; \
ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
# Install PHP Plugins and Configure PHP imap plugin # Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \ RUN set -ex; \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr && \ \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \ savedAptMark="$(apt-mark showmanual)"; \
docker-php-ext-install -j5 \ \
exif \ apt-get update; \
gd \ apt-get install -y --no-install-recommends \
imap \ libldap2-dev \
ldap \ libfreetype6-dev \
mbstring \ libjpeg-dev \
pdo \ libonig-dev \
pdo_mysql \ zlib1g-dev \
pdo_pgsql \ libc-client-dev \
pgsql \ libkrb5-dev \
sodium \ libpng-dev \
tidy \ libpq-dev \
zip libzip-dev \
libtidy-dev \
libsodium-dev \
; \
\
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install -j "$(nproc)" \
exif \
gd \
imap \
ldap \
mbstring \
pdo \
pdo_mysql \
pdo_pgsql \
pgsql \
sodium \
tidy \
zip \
; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# Apache configuration # Apache configuration
RUN a2enmod headers rewrite remoteip; \ RUN a2enmod headers rewrite remoteip; \

View File

@@ -3,48 +3,67 @@ LABEL maintainer="markus@martialblog.de"
# Install OS dependencies # Install OS dependencies
RUN set -ex; \ RUN set -ex; \
apt-get update && \ apt-get update; \
DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \
apt-get install --no-install-recommends -y \ netcat \
; \
\ \
libldap2-dev \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
libfreetype6-dev \
libjpeg-dev \
libonig-dev \
zlib1g-dev \
libc-client-dev \
libkrb5-dev \
libpng-dev \
libpq-dev \
libzip-dev \
libtidy-dev \
libsodium-dev \
netcat \
\
&& apt-get -y autoclean; apt-get -y autoremove; \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Link LDAP library for PHP ldap extension
RUN set -ex; \
ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
# Install PHP Plugins and Configure PHP imap plugin # Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \ RUN set -ex; \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr && \ \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \ savedAptMark="$(apt-mark showmanual)"; \
docker-php-ext-install -j5 \ \
exif \ apt-get update; \
gd \ apt-get install -y --no-install-recommends \
imap \ libldap2-dev \
ldap \ libfreetype6-dev \
mbstring \ libjpeg-dev \
pdo \ libonig-dev \
pdo_mysql \ zlib1g-dev \
pdo_pgsql \ libc-client-dev \
pgsql \ libkrb5-dev \
sodium \ libpng-dev \
tidy \ libpq-dev \
zip libzip-dev \
libtidy-dev \
libsodium-dev \
; \
\
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install -j "$(nproc)" \
exif \
gd \
imap \
ldap \
mbstring \
pdo \
pdo_mysql \
pdo_pgsql \
pgsql \
sodium \
tidy \
zip \
; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
ARG version="3.28.56+230404" ARG version="3.28.56+230404"
ARG sha256_checksum="abfdc800d97feabbd448df4a2cfa72a954d2f6b013475132b0691ac2563e7228" ARG sha256_checksum="abfdc800d97feabbd448df4a2cfa72a954d2f6b013475132b0691ac2563e7228"

View File

@@ -3,49 +3,67 @@ LABEL maintainer="markus@martialblog.de"
# Install OS dependencies # Install OS dependencies
RUN set -ex; \ RUN set -ex; \
apt-get update && \ apt-get update; \
DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \
apt-get install --no-install-recommends -y \ netcat \
; \
\ \
libldap2-dev \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
libfreetype6-dev \
libjpeg-dev \
libonig-dev \
zlib1g-dev \
libc-client-dev \
libkrb5-dev \
libpng-dev \
libpq-dev \
libzip-dev \
libtidy-dev \
libsodium-dev \
netcat \
curl \
\
&& apt-get -y autoclean; apt-get -y autoremove; \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Link LDAP library for PHP ldap extension
RUN set -ex; \
ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
# Install PHP Plugins and Configure PHP imap plugin # Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \ RUN set -ex; \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr && \ \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \ savedAptMark="$(apt-mark showmanual)"; \
docker-php-ext-install -j5 \ \
exif \ apt-get update; \
gd \ apt-get install -y --no-install-recommends \
imap \ libldap2-dev \
ldap \ libfreetype6-dev \
mbstring \ libjpeg-dev \
pdo \ libonig-dev \
pdo_mysql \ zlib1g-dev \
pdo_pgsql \ libc-client-dev \
pgsql \ libkrb5-dev \
sodium \ libpng-dev \
tidy \ libpq-dev \
zip libzip-dev \
libtidy-dev \
libsodium-dev \
; \
\
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install -j "$(nproc)" \
exif \
gd \
imap \
ldap \
mbstring \
pdo \
pdo_mysql \
pdo_pgsql \
pgsql \
sodium \
tidy \
zip \
; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# Apache configuration # Apache configuration
RUN a2enmod headers rewrite remoteip; \ RUN a2enmod headers rewrite remoteip; \

View File

@@ -3,48 +3,67 @@ LABEL maintainer="markus@martialblog.de"
# Install OS dependencies # Install OS dependencies
RUN set -ex; \ RUN set -ex; \
apt-get update && \ apt-get update; \
DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \
apt-get install --no-install-recommends -y \ netcat \
; \
\ \
libldap2-dev \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
libfreetype6-dev \
libjpeg-dev \
libonig-dev \
zlib1g-dev \
libc-client-dev \
libkrb5-dev \
libpng-dev \
libpq-dev \
libzip-dev \
libtidy-dev \
libsodium-dev \
netcat \
\
&& apt-get -y autoclean; apt-get -y autoremove; \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Link LDAP library for PHP ldap extension
RUN set -ex; \
ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
# Install PHP Plugins and Configure PHP imap plugin # Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \ RUN set -ex; \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr && \ \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \ savedAptMark="$(apt-mark showmanual)"; \
docker-php-ext-install -j5 \ \
exif \ apt-get update; \
gd \ apt-get install -y --no-install-recommends \
imap \ libldap2-dev \
ldap \ libfreetype6-dev \
mbstring \ libjpeg-dev \
pdo \ libonig-dev \
pdo_mysql \ zlib1g-dev \
pdo_pgsql \ libc-client-dev \
pgsql \ libkrb5-dev \
sodium \ libpng-dev \
tidy \ libpq-dev \
zip libzip-dev \
libtidy-dev \
libsodium-dev \
; \
\
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install -j "$(nproc)" \
exif \
gd \
imap \
ldap \
mbstring \
pdo \
pdo_mysql \
pdo_pgsql \
pgsql \
sodium \
tidy \
zip \
; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
ARG version="5.6.21+230518" ARG version="5.6.21+230518"
ARG sha256_checksum="47ae13c225b7986e65913e3d2206fd53a7acf511166d2d1a73b5257830eacfef" ARG sha256_checksum="47ae13c225b7986e65913e3d2206fd53a7acf511166d2d1a73b5257830eacfef"

View File

@@ -3,49 +3,67 @@ LABEL maintainer="markus@martialblog.de"
# Install OS dependencies # Install OS dependencies
RUN set -ex; \ RUN set -ex; \
apt-get update && \ apt-get update; \
DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \
apt-get install --no-install-recommends -y \ netcat \
; \
\ \
libldap2-dev \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
libfreetype6-dev \
libjpeg-dev \
libonig-dev \
zlib1g-dev \
libc-client-dev \
libkrb5-dev \
libpng-dev \
libpq-dev \
libzip-dev \
libtidy-dev \
libsodium-dev \
netcat \
curl \
\
&& apt-get -y autoclean; apt-get -y autoremove; \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Link LDAP library for PHP ldap extension
RUN set -ex; \
ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
# Install PHP Plugins and Configure PHP imap plugin # Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \ RUN set -ex; \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr && \ \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \ savedAptMark="$(apt-mark showmanual)"; \
docker-php-ext-install -j5 \ \
exif \ apt-get update; \
gd \ apt-get install -y --no-install-recommends \
imap \ libldap2-dev \
ldap \ libfreetype6-dev \
mbstring \ libjpeg-dev \
pdo \ libonig-dev \
pdo_mysql \ zlib1g-dev \
pdo_pgsql \ libc-client-dev \
pgsql \ libkrb5-dev \
sodium \ libpng-dev \
tidy \ libpq-dev \
zip libzip-dev \
libtidy-dev \
libsodium-dev \
; \
\
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install -j "$(nproc)" \
exif \
gd \
imap \
ldap \
mbstring \
pdo \
pdo_mysql \
pdo_pgsql \
pgsql \
sodium \
tidy \
zip \
; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# Apache configuration # Apache configuration
RUN a2enmod headers rewrite remoteip; \ RUN a2enmod headers rewrite remoteip; \

View File

@@ -3,48 +3,67 @@ LABEL maintainer="markus@martialblog.de"
# Install OS dependencies # Install OS dependencies
RUN set -ex; \ RUN set -ex; \
apt-get update && \ apt-get update; \
DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \
apt-get install --no-install-recommends -y \ netcat \
; \
\ \
libldap2-dev \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
libfreetype6-dev \
libjpeg-dev \
libonig-dev \
zlib1g-dev \
libc-client-dev \
libkrb5-dev \
libpng-dev \
libpq-dev \
libzip-dev \
libtidy-dev \
libsodium-dev \
netcat \
\
&& apt-get -y autoclean; apt-get -y autoremove; \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Link LDAP library for PHP ldap extension
RUN set -ex; \
ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
# Install PHP Plugins and Configure PHP imap plugin # Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \ RUN set -ex; \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr && \ \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \ savedAptMark="$(apt-mark showmanual)"; \
docker-php-ext-install -j5 \ \
exif \ apt-get update; \
gd \ apt-get install -y --no-install-recommends \
imap \ libldap2-dev \
ldap \ libfreetype6-dev \
mbstring \ libjpeg-dev \
pdo \ libonig-dev \
pdo_mysql \ zlib1g-dev \
pdo_pgsql \ libc-client-dev \
pgsql \ libkrb5-dev \
sodium \ libpng-dev \
tidy \ libpq-dev \
zip libzip-dev \
libtidy-dev \
libsodium-dev \
; \
\
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install -j "$(nproc)" \
exif \
gd \
imap \
ldap \
mbstring \
pdo \
pdo_mysql \
pdo_pgsql \
pgsql \
sodium \
tidy \
zip \
; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
ARG version="6.0.7+230515" ARG version="6.0.7+230515"
ARG sha256_checksum="de13467a4963d9759bd24300b5bd5b07f3149b0a62943180afaadfbd0513fef7" ARG sha256_checksum="de13467a4963d9759bd24300b5bd5b07f3149b0a62943180afaadfbd0513fef7"