Skip to content

Commit 7c8d5b9

Browse files
Michael Vasseurvmcj
authored andcommitted
Upgrade gitlab image to 24.04
Also removed some unneeded packages as we don't run those tests anymore. We need some extra changes for the pa11y now as the chrome-browser gets installed in an unreachable location for the domjudge user. Also download the latest dictionary file now as we use the system codespell now. Composer is now again in the ubuntu repo's so we reverted to using that one.
1 parent 940500e commit 7c8d5b9

File tree

1 file changed

+19
-25
lines changed

1 file changed

+19
-25
lines changed

docker-gitlabci/Dockerfile

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,29 @@
1-
FROM ubuntu:22.04
1+
FROM ubuntu:24.04
22
ENV DEBIAN_FRONTEND=noninteractive
3-
ENV PHPSUPPORTED="7.2 7.3 8.0 8.1 8.2"
3+
ENV PHPSUPPORTED="7.4 8.0 8.2 8.3"
44
ENV APTINSTALL="apt install -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold"
55
RUN apt update && apt install -y \
66
acl make zip unzip apache2-utils bsdmainutils libcurl4-gnutls-dev \
77
libjsoncpp-dev libmagic-dev autoconf automake bats sudo debootstrap procps \
88
gcc g++ default-jre-headless default-jdk ghc fp-compiler libcgroup-dev \
9-
devscripts shellcheck nginx libboost-regex-dev \
10-
php8.1 php8.1-cli php8.1-gd php8.1-curl php8.1-mysql php8.1-gmp php8.1-zip php8.1-xml php8.1-mbstring php8.1-fpm php8.1-intl php8.1-pcov \
11-
# W3c test \
12-
httrack \
13-
# Visual regression browser \
14-
cutycapt xvfb openimageio-tools imagemagick \
9+
devscripts shellcheck nginx libboost-regex-dev composer codespell \
10+
php8.3 php8.3-cli php8.3-gd php8.3-curl php8.3-mysql php8.3-gmp php8.3-zip php8.3-xml php8.3-mbstring php8.3-fpm php8.3-intl php8.3-pcov \
1511
# Submit client \
1612
python3-requests python3-magic \
1713
# Docs \
1814
python3-sphinx python3-sphinx-rtd-theme rst2pdf fontconfig python3-yaml \
19-
texlive-latex-recommended texlive-latex-extra \
20-
texlive-fonts-recommended texlive-lang-european latexmk \
15+
texlive-latex-recommended texlive-latex-extra texlive-lang-european latexmk \
2116
# Misc gitlab things \
2217
mariadb-client curl build-essential packaging-dev \
2318
git python3-pip moreutils w3m python3-yaml \
2419
# Things we'd have in the chroot \
25-
ca-certificates default-jre-headless pypy locales software-properties-common \
20+
ca-certificates default-jre-headless pypy3 locales software-properties-common \
2621
# W3c WCAG \
27-
npm libnss3 libcups2 libxss1 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libgtk-3-0 \
28-
# Code coverage for unit test
22+
npm \
23+
# Code coverage for unit test \
2924
php-pear php-dev \
3025
# Needed NPM packages \
31-
&& npm install -g pa11y \
32-
# Needed python packages \
33-
&& pip install codespell \
34-
&& rm -rf /var/lib/apt/lists/*
35-
36-
# Install composer
37-
RUN apt update && \
38-
apt install --no-install-recommends --no-install-suggests -y ca-certificates \
39-
&& rm -rf /var/lib/apt/lists/* \
40-
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php composer-setup.php \
41-
&& mv /composer.phar /usr/local/bin/composer
26+
&& npm install -g pa11y puppeteer
4227

4328
# Install needed global PHP modules
4429
RUN composer -n require justinrainbow/json-schema
@@ -51,7 +36,8 @@ RUN add-apt-repository ppa:ondrej/php -y && apt update && \
5136
for PACKAGE in $PACKAGES; do \
5237
$APTINSTALL php${VERSION}-${PACKAGE#php*-}; \
5338
done; \
54-
done && update-alternatives --set php /usr/bin/php8.1
39+
done && update-alternatives --set php /usr/bin/php8.3 \
40+
&& rm -rf /var/lib/apt/lists/*
5541

5642
# Put the gitlab user in sudo
5743
RUN echo 'ALL ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
@@ -61,6 +47,14 @@ RUN useradd -d /nonexistent -g nogroup -s /bin/false domjudge-run-0
6147
RUN useradd -d /nonexistent -g nogroup -s /bin/false domjudge-run-1
6248
RUN groupadd domjudge-run
6349

50+
# Download chrome for the domjudge user
51+
RUN su domjudge -c "npx puppeteer browsers install chrome"
52+
53+
# Update dictionary to latest version
54+
ENV GITHUBDICTIONARY="https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt"
55+
ENV CODESPELLDICTLOCATION="/usr/lib/python3/dist-packages/codespell_lib/data/dictionary.txt"
56+
RUN wget $GITHUBDICTIONARY -O $CODESPELLDICTLOCATION
57+
6458
# Do some extra setup
6559
RUN mkdir -p /run/php \
6660
&& rm /etc/php/*/fpm/pool.d/www.conf

0 commit comments

Comments
 (0)