Skip to content
Snippets Groups Projects
Commit 57bc0228 authored by Andrey Postnikov's avatar Andrey Postnikov
Browse files

Modernize 8.2-8.3 images #3387737 and #3108643

parent af524f81
No related branches found
No related tags found
No related merge requests found
Pipeline #156943 passed
######
# Base
######
ARG THE_BASE_IMAGE=debian:bullseye-slim
ARG PHPIZE_DEPS="autoconf file g++ gcc make pkg-config re2c"
ARG PHP_CFLAGS="-O2 -g"
FROM debian:bullseye-slim as builder
ENV DRUPALCI=TRUE TERM=xterm
FROM ${THE_BASE_IMAGE} as builder
ENV DRUPALCI=TRUE TERM=xterm DEBIAN_FRONTEND=noninteractive
#########
# Php build
......@@ -23,13 +23,10 @@ ENV PHP_CFLAGS="$PHP_CFLAGS"
ENV PHP_CPPFLAGS="$PHP_CFLAGS"
ENV PHP_LDFLAGS=""
RUN set -xe &&\
RUN set -eux &&\
echo 'APT::Install-Recommends "0";' >/etc/apt/apt.conf.d/99norecommends &&\
\
echo "deb http://deb.debian.org/debian bullseye-backports main" | tee /etc/apt/sources.list.d/bullseye-backports.list &&\
\
apt-get update && apt-get install -qy --no-install-recommends \
ca-certificates curl &&\
ca-certificates curl apt-utils &&\
\
mkdir -p /usr/src &&\
cd /usr/src &&\
......@@ -50,9 +47,6 @@ RUN set -xe &&\
zlib1g-dev \
libpng-dev \
libwebp-dev \
libavif-dev/bullseye-backports \
libavif13/bullseye-backports \
libaom3/bullseye-backports \
libsqlite3-dev \
libpq-dev \
libssl-dev \
......@@ -63,7 +57,15 @@ RUN set -xe &&\
libzip-dev \
ncurses-dev \
" &&\
apt-get install -qy $PHPIZE_DEPS $buildDeps --no-install-recommends --allow-downgrades &&\
apt-get install -qy --no-install-recommends $PHPIZE_DEPS $buildDeps &&\
\
echo "deb http://deb.debian.org/debian bullseye-backports main" | tee /etc/apt/sources.list.d/bullseye-backports.list &&\
apt-get update &&\
apt-get install -qy --no-install-recommends --allow-downgrades \
libavif-dev/bullseye-backports \
libavif13/bullseye-backports \
libaom3/bullseye-backports \
&&\
rm -rf /var/lib/apt/lists/*
COPY ./conf/php/php.ini /usr/local/etc/php/php.ini
......@@ -126,7 +128,8 @@ RUN set -xe &&\
cd / && rm -fr "$buildDir"
# install pecl extensions for apcu, pcov, xdebug, and yaml
RUN pecl install APCu-5.1.23 pcov-1.0.11 xdebug-3.3.2 yaml-2.2.3 \
RUN pecl channel-update pecl.php.net &&\
pecl install APCu-5.1.23 pcov-1.0.11 xdebug-3.3.2 yaml-2.2.3 \
&&\
# stript .debug files out of executables
echo '\
......@@ -145,8 +148,8 @@ RUN pecl install APCu-5.1.23 pcov-1.0.11 xdebug-3.3.2 yaml-2.2.3 \
# Php Setup
######
FROM debian:bullseye-slim
FROM ${THE_BASE_IMAGE}
ARG DEBIAN_FRONTEND=noninteractive
ENV DRUPALCI=TRUE TERM=xterm
COPY --from=builder /usr/local /usr/local
......@@ -156,8 +159,8 @@ COPY --from=builder /etc/apache2/mods-enabled/php.load /etc/apache2/mods-enabled
COPY --from=builder /etc/apache2/mods-available/php.load /etc/apache2/mods-available/php.load
RUN set -xe &&\
echo 'APT::Install-Recommends "0";' >/etc/apt/apt.conf.d/99norecommends &&\
echo "deb http://deb.debian.org/debian bullseye-backports main" | tee /etc/apt/sources.list.d/bullseye-backports.list; \
echo 'APT::Install-Recommends "0";' >/etc/apt/apt.conf.d/99norecommends ;\
apt-get update &&\
buildDeps=" \
libedit2 \
libfreetype6 \
......@@ -168,8 +171,6 @@ RUN set -xe &&\
libpng16-16 \
zlib1g \
libwebp6 \
libavif13/bullseye-backports \
libaom3/bullseye-backports \
libsqlite3-0 \
libpq5 \
libtidy5deb1 \
......@@ -189,8 +190,14 @@ RUN set -xe &&\
unzip \
xz-utils \
" &&\
apt-get update && \
apt-get install -y --no-install-recommends $buildDeps $runDeps &&\
apt-get install -qy --no-install-recommends $buildDeps $runDeps &&\
\
echo "deb http://deb.debian.org/debian bullseye-backports main" | tee /etc/apt/sources.list.d/bullseye-backports.list &&\
apt-get update &&\
apt-get install -qy --no-install-recommends --allow-downgrades \
libavif13/bullseye-backports \
libaom3/bullseye-backports \
&&\
rm -rf /var/lib/apt/lists/*
# Install Composer, Drush
......@@ -208,7 +215,7 @@ RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg -
curl -sSLo /etc/apt/trusted.gpg.d/yarn.gpg.asc https://dl.yarnpkg.com/debian/pubkey.gpg &&\
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\
apt-get update &&\
apt-get install -qy nodejs yarn &&\
apt-get install -qy --no-install-recommends nodejs yarn &&\
rm -rf /var/lib/apt/lists/*
# Install phantomjs, supervisor
......@@ -220,7 +227,7 @@ RUN _file=phantomjs-2.1.1-linux-x86_64 &&\
rm -rf /$_file &&\
chmod 755 /usr/bin/phantomjs &&\
apt-get update &&\
apt-get install -y supervisor fontconfig &&\
apt-get install -qy --no-install-recommends supervisor fontconfig &&\
rm -rf /var/lib/apt/lists/*
COPY ./conf/supervisor-phantomjs.conf /etc/supervisor/conf.d/phantomjs.conf
......
######
# Base
######
ARG THE_BASE_IMAGE=debian:bookworm-slim
ARG PHPIZE_DEPS="autoconf file g++ gcc make pkg-config re2c"
ARG PHP_CFLAGS="-O2 -g"
FROM debian:bookworm-slim as builder
ENV DRUPALCI=TRUE TERM=xterm
FROM ${THE_BASE_IMAGE} as builder
ENV DRUPALCI=TRUE TERM=xterm DEBIAN_FRONTEND=noninteractive
#########
# Php build
......@@ -23,11 +23,10 @@ ENV PHP_CFLAGS="$PHP_CFLAGS"
ENV PHP_CPPFLAGS="$PHP_CFLAGS"
ENV PHP_LDFLAGS=""
RUN set -xe &&\
RUN set -eux &&\
echo 'APT::Install-Recommends "0";' >/etc/apt/apt.conf.d/99norecommends &&\
\
apt-get update && apt-get install -qy --no-install-recommends \
ca-certificates curl &&\
ca-certificates curl apt-utils &&\
\
mkdir -p /usr/src &&\
cd /usr/src &&\
......@@ -59,7 +58,7 @@ RUN set -xe &&\
libzip-dev \
ncurses-dev \
" &&\
apt-get install -qy $PHPIZE_DEPS $buildDeps --no-install-recommends --allow-downgrades &&\
apt-get install -qy --no-install-recommends $PHPIZE_DEPS $buildDeps &&\
rm -rf /var/lib/apt/lists/*
COPY ./conf/php/php.ini /usr/local/etc/php/php.ini
......@@ -122,7 +121,8 @@ RUN set -xe &&\
cd / && rm -fr "$buildDir"
# install pecl extensions for apcu, pcov, xdebug, and yaml
RUN pecl install APCu-5.1.23 pcov-1.0.11 xdebug-3.3.2 yaml-2.2.3 \
RUN pecl channel-update pecl.php.net &&\
pecl install APCu-5.1.23 pcov-1.0.11 xdebug-3.3.2 yaml-2.2.3 \
&&\
# stript .debug files out of executables
echo '\
......@@ -141,8 +141,8 @@ RUN pecl install APCu-5.1.23 pcov-1.0.11 xdebug-3.3.2 yaml-2.2.3 \
# Php Setup
######
FROM debian:bookworm-slim
FROM ${THE_BASE_IMAGE}
ARG DEBIAN_FRONTEND=noninteractive
ENV DRUPALCI=TRUE TERM=xterm
COPY --from=builder /usr/local /usr/local
......@@ -152,7 +152,8 @@ COPY --from=builder /etc/apache2/mods-enabled/php.load /etc/apache2/mods-enabled
COPY --from=builder /etc/apache2/mods-available/php.load /etc/apache2/mods-available/php.load
RUN set -xe &&\
echo 'APT::Install-Recommends "0";' >/etc/apt/apt.conf.d/99norecommends &&\
echo 'APT::Install-Recommends "0";' >/etc/apt/apt.conf.d/99norecommends ;\
apt-get update &&\
buildDeps=" \
libedit2 \
libfreetype6 \
......@@ -184,8 +185,7 @@ RUN set -xe &&\
unzip \
xz-utils \
" &&\
apt-get update && \
apt-get install -y --no-install-recommends $buildDeps $runDeps &&\
apt-get install -qy --no-install-recommends $buildDeps $runDeps &&\
rm -rf /var/lib/apt/lists/*
# Install Composer, Drush
......@@ -203,7 +203,7 @@ RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg -
curl -sSLo /etc/apt/trusted.gpg.d/yarn.gpg.asc https://dl.yarnpkg.com/debian/pubkey.gpg &&\
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\
apt-get update &&\
apt-get install -qy nodejs yarn &&\
apt-get install -qy --no-install-recommends nodejs yarn &&\
rm -rf /var/lib/apt/lists/*
# Install phantomjs, supervisor
......@@ -215,7 +215,7 @@ RUN _file=phantomjs-2.1.1-linux-x86_64 &&\
rm -rf /$_file &&\
chmod 755 /usr/bin/phantomjs &&\
apt-get update &&\
apt-get install -y supervisor fontconfig &&\
apt-get install -qy --no-install-recommends supervisor fontconfig &&\
rm -rf /var/lib/apt/lists/*
COPY ./conf/supervisor-phantomjs.conf /etc/supervisor/conf.d/phantomjs.conf
......
######
# Base
######
ARG THE_BASE_IMAGE=ubuntu:noble
ARG PHPIZE_DEPS="autoconf file g++ gcc make pkg-config re2c"
ARG PHP_CFLAGS="-O2 -g"
FROM ubuntu:noble as builder
ENV DRUPALCI=TRUE TERM=xterm
FROM ${THE_BASE_IMAGE} as builder
ENV DRUPALCI=TRUE TERM=xterm DEBIAN_FRONTEND=noninteractive
#########
# Php build
......@@ -23,11 +23,10 @@ ENV PHP_CFLAGS="$PHP_CFLAGS"
ENV PHP_CPPFLAGS="$PHP_CFLAGS"
ENV PHP_LDFLAGS=""
RUN set -xe &&\
RUN set -eux &&\
echo 'APT::Install-Recommends "0";' >/etc/apt/apt.conf.d/99norecommends &&\
\
apt-get update && apt-get install -qy --no-install-recommends \
ca-certificates curl &&\
ca-certificates curl apt-utils &&\
\
mkdir -p /usr/src &&\
cd /usr/src &&\
......@@ -59,7 +58,7 @@ RUN set -xe &&\
libzip-dev \
libncurses-dev \
" &&\
apt-get install -qy $PHPIZE_DEPS $buildDeps --no-install-recommends --allow-downgrades &&\
apt-get install -qy --no-install-recommends $PHPIZE_DEPS $buildDeps &&\
rm -rf /var/lib/apt/lists/*
COPY ./conf/php/php.ini /usr/local/etc/php/php.ini
......@@ -122,7 +121,8 @@ RUN set -xe &&\
cd / && rm -fr "$buildDir"
# install pecl extensions for apcu, pcov, xdebug, and yaml
RUN pecl install APCu-5.1.23 pcov-1.0.11 xdebug-3.3.2 yaml-2.2.3 \
RUN pecl channel-update pecl.php.net &&\
pecl install APCu-5.1.23 pcov-1.0.11 xdebug-3.3.2 yaml-2.2.3 \
&&\
# stript .debug files out of executables
echo '\
......@@ -141,8 +141,8 @@ RUN pecl install APCu-5.1.23 pcov-1.0.11 xdebug-3.3.2 yaml-2.2.3 \
# Php Setup
######
FROM ubuntu:noble
FROM ${THE_BASE_IMAGE}
ARG DEBIAN_FRONTEND=noninteractive
ENV DRUPALCI=TRUE TERM=xterm
COPY --from=builder /usr/local /usr/local
......@@ -152,7 +152,8 @@ COPY --from=builder /etc/apache2/mods-enabled/php.load /etc/apache2/mods-enabled
COPY --from=builder /etc/apache2/mods-available/php.load /etc/apache2/mods-available/php.load
RUN set -xe &&\
echo 'APT::Install-Recommends "0";' >/etc/apt/apt.conf.d/99norecommends &&\
echo 'APT::Install-Recommends "0";' >/etc/apt/apt.conf.d/99norecommends ;\
apt-get update &&\
buildDeps=" \
libedit2 \
libfreetype6 \
......@@ -184,8 +185,7 @@ RUN set -xe &&\
unzip \
xz-utils \
" &&\
apt-get update && \
apt-get install -y --no-install-recommends $buildDeps $runDeps &&\
apt-get install -qy --no-install-recommends $buildDeps $runDeps &&\
rm -rf /var/lib/apt/lists/*
# Install Composer, Drush
......@@ -203,7 +203,7 @@ RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg -
curl -sSLo /etc/apt/trusted.gpg.d/yarn.gpg.asc https://dl.yarnpkg.com/debian/pubkey.gpg &&\
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\
apt-get update &&\
apt-get install -qy nodejs yarn &&\
apt-get install -qy --no-install-recommends nodejs yarn &&\
rm -rf /var/lib/apt/lists/*
# Install phantomjs, supervisor
......@@ -215,7 +215,7 @@ RUN _file=phantomjs-2.1.1-linux-x86_64 &&\
rm -rf /$_file &&\
chmod 755 /usr/bin/phantomjs &&\
apt-get update &&\
apt-get install -y supervisor fontconfig &&\
apt-get install -qy --no-install-recommends supervisor fontconfig &&\
rm -rf /var/lib/apt/lists/*
COPY ./conf/supervisor-phantomjs.conf /etc/supervisor/conf.d/phantomjs.conf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment