Skip to content

Commit 9e08b73

Browse files
committed
Updated docker to Ubuntu 24.04 and fixed stack installation
1 parent fc158e2 commit 9e08b73

File tree

5 files changed

+19
-12
lines changed

5 files changed

+19
-12
lines changed

Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ All notable changes to this project will be documented here.
44
## [unreleased]
55
- Install stack with GHCup (#626)
66
- Fixed AI tester to report error when the specified `submission` file is not found (#663)
7+
- Updated docker image to use Ubuntu 24.04 (#667)
8+
- Fixed stack installation in Docker environment (#667)
79

810
## [v2.8.3]
911
- Add troubleshooting section talking about Docker Content Trust (DCT) (#653)

client/.dockerfiles/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
ARG UBUNTU_VERSION=22.04
1+
ARG UBUNTU_VERSION=24.04
22

33
FROM ubuntu:$UBUNTU_VERSION
44

5+
# Remove ubuntu user, added in 23.04
6+
RUN userdel -r ubuntu
7+
58
RUN apt-get update -y && \
69
DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common && \
710
DEBIAN_FRONTEND=noninteractive add-apt-repository -y ppa:deadsnakes/ppa && \

compose.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ services:
44
context: ./server
55
dockerfile: ./.dockerfiles/Dockerfile
66
args:
7-
UBUNTU_VERSION: '22.04'
7+
UBUNTU_VERSION: '24.04'
88
LOGIN_USER: 'docker'
99
WORKSPACE: '/home/docker/.autotesting'
10-
image: markus-autotest-server-dev:1.3.0
10+
image: markus-autotest-server-dev:1.4.0
1111
volumes:
1212
- ./server:/app:cached
1313
- venv_server:/home/docker/markus_venv
@@ -28,8 +28,8 @@ services:
2828
context: ./client
2929
dockerfile: ./.dockerfiles/Dockerfile
3030
args:
31-
UBUNTU_VERSION: '22.04'
32-
image: markus-autotest-client-dev:1.3.0
31+
UBUNTU_VERSION: '24.04'
32+
image: markus-autotest-client-dev:1.4.0
3333
container_name: 'autotest-client'
3434
volumes:
3535
- ./client:/app:cached

server/.dockerfiles/Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
ARG UBUNTU_VERSION=22.04
1+
ARG UBUNTU_VERSION=24.04
22

33
FROM ubuntu:$UBUNTU_VERSION AS base
44

5+
# Remove ubuntu user, added in 23.04
6+
RUN userdel -r ubuntu
57

68
ARG LOGIN_USER
79
ARG WORKSPACE
@@ -38,18 +40,17 @@ RUN useradd -ms /bin/bash $LOGIN_USER && \
3840
adduser --disabled-login --no-create-home $worker && \
3941
echo "$LOGIN_USER ALL=($worker) NOPASSWD:ALL" | EDITOR="tee -a" visudo && \
4042
usermod -aG $worker $LOGIN_USER; \
41-
done
42-
43-
RUN chmod a+x /home/${LOGIN_USER}
43+
done && \
44+
chmod a+x /home/${LOGIN_USER}
4445

4546
COPY . /app
4647

4748
RUN find /app/autotest_server/testers -name requirements.system -exec {} \;
4849

4950
RUN echo "TZ=$( cat /etc/timezone )" >> /etc/R/Renviron.site
5051

51-
RUN mkdir -p ${WORKSPACE} && chown ${LOGIN_USER} ${WORKSPACE}
52-
RUN mkdir -p /home/${LOGIN_USER}/markus_venv && chown ${LOGIN_USER} /home/${LOGIN_USER}/markus_venv
52+
RUN mkdir -p ${WORKSPACE} && chown ${LOGIN_USER} ${WORKSPACE} && \
53+
mkdir -p /home/${LOGIN_USER}/markus_venv && chown ${LOGIN_USER} /home/${LOGIN_USER}/markus_venv
5354

5455
WORKDIR /home/${LOGIN_USER}
5556

server/autotest_server/testers/haskell/requirements.system

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ if ! dpkg -l ghc cabal-install &> /dev/null; then
77
fi
88

99
if [ ! -x "$HOME/.ghcup/bin/ghcup" ]; then
10-
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
10+
BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
1111
$HOME/.ghcup/bin/ghcup install stack recommended
12+
cp $HOME/.ghcup/bin/stack /usr/local/bin/
1213
fi

0 commit comments

Comments
 (0)