fix(Dockerfile): checkout master
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Markus Pesch 2021-09-10 21:15:08 +02:00
parent 6609d2528e
commit 44b0814504
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
2 changed files with 35 additions and 33 deletions

View File

@ -28,39 +28,42 @@ RUN set -eux; \
# Install required PHP extensions # Install required PHP extensions
RUN set -ex; \ RUN set -ex; \
savedAptMark="$(apt-mark showmanual)"; \ savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \ apt-get update; \
apt-get install --yes --no-install-recommends \ apt-get install --yes --no-install-recommends \
libc-client2007e-dev \ libc-client2007e-dev \
libkrb5-dev \ libkrb5-dev \
libpq-dev \ libpq-dev \
libsqlite3-dev; \ libsqlite3-dev; \
docker-php-ext-configure imap --with-imap-ssl --with-kerberos; \ docker-php-ext-configure imap --with-imap-ssl --with-kerberos; \
docker-php-ext-install -j "$(nproc)" \ docker-php-ext-install -j "$(nproc)" \
imap \ imap \
pdo_mysql \ pdo_mysql \
pdo_pgsql \ pdo_pgsql \
pdo_sqlite \ pdo_sqlite \
pgsql; \ pgsql; \
apt-mark auto '.*' > /dev/null; \ apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \ apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \ | awk '/=>/ { print $3 }' \
| sort -u \ | sort -u \
| xargs -r dpkg-query -S \ | xargs -r dpkg-query -S \
| cut -d: -f1 \ | cut -d: -f1 \
| sort -u \ | sort -u \
| xargs -rt apt-mark manual; \ | xargs -rt apt-mark manual; \
apt-get purge --yes --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ if [ ! -z ${POSTFIXADMIN_VERSION} ]; then \
rm --recursive --force /var/lib/apt/lists/* curl --fail --silent --show-error --location "https://github.com/postfixadmin/postfixadmin/archive/postfixadmin-${POSTFIXADMIN_VERSION}.tar.gz" --output postfixadmin.tar.gz; \
tar --extract --file postfixadmin.tar.gz --directory /var/www/html --strip-components=1; \
rm postfixadmin.tar.gz; \
else \
apt-get install --yes git; \
git clone https://github.com/postfixadmin/postfixadmin.git /var/www/html; \
fi; \
apt-get purge --yes --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm --recursive --force /var/lib/apt/lists/*
RUN set -eu; \ RUN mkdir --parents /var/www/html/templates_c; \
curl --fail --silent --show-error --location "https://github.com/postfixadmin/postfixadmin/archive/postfixadmin-${POSTFIXADMIN_VERSION}.tar.gz" --output postfixadmin.tar.gz ; \ chown --recursive www-data:www-data /var/www/html
tar --extract --file postfixadmin.tar.gz --directory /var/www/html --strip-components=1; \
rm postfixadmin.tar.gz; \
# Does not exist in tarball but is required
mkdir --parents /var/www/html/templates_c; \
chown --recursive www-data:www-data /var/www/html
COPY entrypoint.sh /usr/local/bin/ COPY entrypoint.sh /usr/local/bin/

View File

@ -20,7 +20,6 @@ PHONY:=container-image/build
container-image/build: container-image/build:
${CONTAINER_RUNTIME} build \ ${CONTAINER_RUNTIME} build \
--build-arg POSTFIXADMIN_VERSION=${POSTFIXADMIN_VERSION} \ --build-arg POSTFIXADMIN_VERSION=${POSTFIXADMIN_VERSION} \
--build-arg POSTFIXADMIN_SHA512=${POSTFIXADMIN_SHA512} \
--file Dockerfile \ --file Dockerfile \
--no-cache \ --no-cache \
--pull \ --pull \