Skip to content

Commit 3009a17

Browse files
Michael Vasseurvmcj
authored andcommitted
Install all tools for pa11y as domjudge user
The CI broke as the cache only knows of an older version of Chrome.
1 parent 2cb7eb9 commit 3009a17

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docker-gitlabci/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ RUN apt-get update && apt-get install -y \
2222
npm \
2323
# Code coverage for unit test \
2424
php-pear php-dev \
25-
# Needed NPM packages \
26-
&& npm install -g pa11y puppeteer \
2725
&& rm -rf /var/lib/apt/lists/*
2826

27+
# Install needed NPM packages and download chrome for the domjudge user
28+
RUN su domjudge -c "npm install pa11y puppeteer && \
29+
npx puppeteer browsers install chrome && \
30+
npm cache clean"
31+
2932
# Install needed global PHP modules
3033
RUN composer -n require justinrainbow/json-schema
3134

@@ -48,9 +51,6 @@ RUN useradd -d /nonexistent -g nogroup -s /bin/false domjudge-run-0
4851
RUN useradd -d /nonexistent -g nogroup -s /bin/false domjudge-run-1
4952
RUN groupadd domjudge-run
5053

51-
# Download chrome for the domjudge user
52-
RUN su domjudge -c "npx puppeteer browsers install chrome"
53-
5454
# Update dictionary to latest version
5555
ENV GITHUBDICTIONARY="https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt"
5656
ENV CODESPELLDICTLOCATION="/usr/lib/python3/dist-packages/codespell_lib/data/dictionary.txt"

0 commit comments

Comments
 (0)