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,10 +3,21 @@ 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 \
; \
\ \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libldap2-dev \ libldap2-dev \
libfreetype6-dev \ libfreetype6-dev \
libjpeg-dev \ libjpeg-dev \
@@ -19,20 +30,13 @@ RUN set -ex; \
libzip-dev \ libzip-dev \
libtidy-dev \ libtidy-dev \
libsodium-dev \ libsodium-dev \
netcat \ ; \
\ \
&& apt-get -y autoclean; apt-get -y autoremove; \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
rm -rf /var/lib/apt/lists/* docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
# Link LDAP library for PHP ldap extension docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
RUN set -ex; \ docker-php-ext-install -j "$(nproc)" \
ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
# Install PHP Plugins and Configure PHP imap plugin
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 && \
docker-php-ext-install -j5 \
exif \ exif \
gd \ gd \
imap \ imap \
@@ -44,7 +48,22 @@ RUN set -ex; \
pgsql \ pgsql \
sodium \ sodium \
tidy \ tidy \
zip 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,10 +3,21 @@ 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 \
; \
\ \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libldap2-dev \ libldap2-dev \
libfreetype6-dev \ libfreetype6-dev \
libjpeg-dev \ libjpeg-dev \
@@ -19,20 +30,13 @@ RUN set -ex; \
libzip-dev \ libzip-dev \
libtidy-dev \ libtidy-dev \
libsodium-dev \ libsodium-dev \
netcat \ ; \
\ \
&& apt-get -y autoclean; apt-get -y autoremove; \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
rm -rf /var/lib/apt/lists/* docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
# Link LDAP library for PHP ldap extension docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
RUN set -ex; \ docker-php-ext-install -j "$(nproc)" \
ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
# Install PHP Plugins and Configure PHP imap plugin
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 && \
docker-php-ext-install -j5 \
exif \ exif \
gd \ gd \
imap \ imap \
@@ -44,7 +48,22 @@ RUN set -ex; \
pgsql \ pgsql \
sodium \ sodium \
tidy \ tidy \
zip 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,10 +3,21 @@ 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 \
; \
\ \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libldap2-dev \ libldap2-dev \
libfreetype6-dev \ libfreetype6-dev \
libjpeg-dev \ libjpeg-dev \
@@ -19,21 +30,13 @@ RUN set -ex; \
libzip-dev \ libzip-dev \
libtidy-dev \ libtidy-dev \
libsodium-dev \ libsodium-dev \
netcat \ ; \
curl \
\ \
&& apt-get -y autoclean; apt-get -y autoremove; \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
rm -rf /var/lib/apt/lists/* docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
# Link LDAP library for PHP ldap extension docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
RUN set -ex; \ docker-php-ext-install -j "$(nproc)" \
ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
# Install PHP Plugins and Configure PHP imap plugin
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 && \
docker-php-ext-install -j5 \
exif \ exif \
gd \ gd \
imap \ imap \
@@ -45,7 +48,22 @@ RUN set -ex; \
pgsql \ pgsql \
sodium \ sodium \
tidy \ tidy \
zip 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,10 +3,21 @@ 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 \
; \
\ \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libldap2-dev \ libldap2-dev \
libfreetype6-dev \ libfreetype6-dev \
libjpeg-dev \ libjpeg-dev \
@@ -19,20 +30,13 @@ RUN set -ex; \
libzip-dev \ libzip-dev \
libtidy-dev \ libtidy-dev \
libsodium-dev \ libsodium-dev \
netcat \ ; \
\ \
&& apt-get -y autoclean; apt-get -y autoremove; \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
rm -rf /var/lib/apt/lists/* docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
# Link LDAP library for PHP ldap extension docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
RUN set -ex; \ docker-php-ext-install -j "$(nproc)" \
ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
# Install PHP Plugins and Configure PHP imap plugin
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 && \
docker-php-ext-install -j5 \
exif \ exif \
gd \ gd \
imap \ imap \
@@ -44,7 +48,22 @@ RUN set -ex; \
pgsql \ pgsql \
sodium \ sodium \
tidy \ tidy \
zip 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,10 +3,21 @@ 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 \
; \
\ \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libldap2-dev \ libldap2-dev \
libfreetype6-dev \ libfreetype6-dev \
libjpeg-dev \ libjpeg-dev \
@@ -19,21 +30,13 @@ RUN set -ex; \
libzip-dev \ libzip-dev \
libtidy-dev \ libtidy-dev \
libsodium-dev \ libsodium-dev \
netcat \ ; \
curl \
\ \
&& apt-get -y autoclean; apt-get -y autoremove; \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
rm -rf /var/lib/apt/lists/* docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
# Link LDAP library for PHP ldap extension docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
RUN set -ex; \ docker-php-ext-install -j "$(nproc)" \
ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
# Install PHP Plugins and Configure PHP imap plugin
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 && \
docker-php-ext-install -j5 \
exif \ exif \
gd \ gd \
imap \ imap \
@@ -45,7 +48,22 @@ RUN set -ex; \
pgsql \ pgsql \
sodium \ sodium \
tidy \ tidy \
zip 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,10 +3,21 @@ 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 \
; \
\ \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libldap2-dev \ libldap2-dev \
libfreetype6-dev \ libfreetype6-dev \
libjpeg-dev \ libjpeg-dev \
@@ -19,20 +30,13 @@ RUN set -ex; \
libzip-dev \ libzip-dev \
libtidy-dev \ libtidy-dev \
libsodium-dev \ libsodium-dev \
netcat \ ; \
\ \
&& apt-get -y autoclean; apt-get -y autoremove; \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
rm -rf /var/lib/apt/lists/* docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
# Link LDAP library for PHP ldap extension docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
RUN set -ex; \ docker-php-ext-install -j "$(nproc)" \
ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
# Install PHP Plugins and Configure PHP imap plugin
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 && \
docker-php-ext-install -j5 \
exif \ exif \
gd \ gd \
imap \ imap \
@@ -44,7 +48,22 @@ RUN set -ex; \
pgsql \ pgsql \
sodium \ sodium \
tidy \ tidy \
zip 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"