Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small reorderings #199

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-contributor-container-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ name: 'Build Contributor container (PR)'
on:
push:
paths:
- docker-contributor
- docker-contributor/**
- .github/workflows/build-contributor-container-PR.yml
pull_request:
branches:
- main
paths:
- docker-contributor
- docker-contributor/**
- .github/workflows/build-contributor-container-PR.yml

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-domjudge-container-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on:
push:
paths:
- .github/workflows/build-domjudge-container-PR.yml
- docker
- docker/**
pull_request:
branches:
- main
paths:
- .github/workflows/build-domjudge-container-PR.yml
- docker
- docker/**

env:
DOMJUDGE_VERSION: M.m.p
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-gitlab-container-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
push:
paths:
- docker-contributor/php-config
- docker-gitlabci
- docker-gitlabci/**
- .github/workflows/build-gitlab-container-PR.yml
pull_request:
branches:
- main
paths:
- docker-contributor/php-config
- docker-gitlabci
- docker-gitlabci/**
- .github/workflows/build-gitlab-container-PR.yml

jobs:
Expand Down
14 changes: 5 additions & 9 deletions docker/domserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ LABEL org.opencontainers.image.authors="DOMjudge team <[email protected]>"

ENV DEBIAN_FRONTEND=noninteractive

# Set up user
RUN groupadd domjudge -g2004
RUN useradd -m domjudge -u2004 -g2004

Comment on lines +6 to +9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a draft in branch queue/check-ownership-across-docker-build-stages (f62e173) to check the UID & GID are the same instead of having to hard-code the values.

# Install required packages for build of domserver
RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
Expand All @@ -22,9 +26,6 @@ RUN apt-get update \
# Use venv to install latest Sphinx. 6.1.0 or higher is required to build DOMjudge docs.
RUN python3 -m venv /venv && . /venv/bin/activate && pip3 install sphinx sphinx-rtd-theme rst2pdf

# Set up user
RUN useradd -m domjudge

# Install composer
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php \
Expand Down Expand Up @@ -58,18 +59,13 @@ RUN useradd -m domjudge
RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
acl curl zip unzip supervisor mariadb-client apache2-utils \
nginx php-cli php-fpm php-zip \
nginx php-cli php-fpm php-zip composer \
php-gd php-curl php-mysql php-json php-intl \
php-gmp php-xml php-mbstring php-ldap \
enscript lpr \
ca-certificates python3-yaml python3-requests \
&& rm -rf /var/lib/apt/lists/*

# Install composer
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php \
&& mv /composer.phar /usr/local/bin/composer

# Copy domserver
COPY --from=domserver-build /opt/domjudge/domserver /opt/domjudge/domserver
COPY --from=domserver-build /opt/domjudge/doc /opt/domjudge/doc
Expand Down
3 changes: 2 additions & 1 deletion docker/judgehost/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ ENV DEBIAN_FRONTEND=noninteractive \
RUN_USER_UID_GID=62860

# Set up user
RUN useradd -m domjudge
RUN groupadd domjudge -g2004
RUN useradd -m domjudge -u2004 -g2004

# Install required packages for running of judgehost
RUN apt-get update \
Expand Down
15 changes: 5 additions & 10 deletions docker/judgehost/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,23 @@ LABEL org.opencontainers.image.authors="DOMjudge team <[email protected]>"

ENV DEBIAN_FRONTEND=noninteractive

# Set up user
RUN groupadd domjudge -g2004
RUN useradd -m domjudge -u2004 -g2004

# Install required packages for build of judgehost
RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
autoconf automake git pkg-config \
gcc g++ make zip unzip \
php-cli php-zip lsb-release debootstrap \
php-gd php-curl php-mysql php-json \
php-gmp php-xml php-mbstring \
php-gmp php-xml php-mbstring composer \
sudo bsdmainutils ntp libcgroup-dev procps \
libcurl4-gnutls-dev libjsoncpp-dev libmagic-dev \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Set up user
RUN useradd -m domjudge

# Install composer

RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php \
&& mv /composer.phar /usr/local/bin/composer

# Add DOMjudge source code and build script
ADD domjudge.tar.gz /domjudge-src
ADD judgehost/build.sh /domjudge-src
Expand Down
Loading