Skip to content

Commit e2373e9

Browse files
committed
[MINOR] Improve Docker Image Stability
This commit updates the docker images for systemds to use a consistent base and build sequence to enable caching of image parts. This caching avoid an 30 minute build time to update the test entrypoint script for GitHub action test updates.
1 parent 496a22f commit e2373e9

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

docker/entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ log="/tmp/sysdstest.log"
3232
mvn -ntp -B test-compile 2>&1 | grep -E "BUILD|Total time:|---|Building SystemDS"
3333
mvn -ntp -B test -D maven.test.skip=false -D automatedtestbase.outputbuffering=true -D test=$1 2>&1 | grep -v "already exists in destination." | tee $log
3434

35+
# Merge Federated test runs.
36+
[ -f target/jacoco.exec ] && mv target/jacoco.exec target/jacoco_main.exec
37+
mvn -ntp -B jacoco:merge
38+
3539
grep_args="SUCCESS"
3640
grepvals="$( tail -n 100 $log | grep $grep_args)"
3741

docker/sysds.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#
2020
#-------------------------------------------------------------
2121

22-
FROM ubuntu:24.04
22+
FROM ubuntu:24.04@sha256:6015f66923d7afbc53558d7ccffd325d43b4e249f41a6e93eef074c9505d2233
2323

2424
WORKDIR /usr/src/
2525

docker/testsysds.Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
#
2020
#-------------------------------------------------------------
2121

22-
FROM ubuntu:24.04
23-
22+
FROM ubuntu:24.04@sha256:6015f66923d7afbc53558d7ccffd325d43b4e249f41a6e93eef074c9505d2233
2423

2524
WORKDIR /usr/src/
2625
ENV MAVEN_VERSION=3.9.9
@@ -34,9 +33,6 @@ ENV LC_ALL=en_US.UTF-8
3433
ENV LANG=en_US.UTF-8
3534
ENV LD_LIBRARY_PATH=/usr/local/lib/
3635

37-
COPY ./src/test/scripts/installDependencies.R installDependencies.R
38-
COPY ./docker/entrypoint.sh /entrypoint.sh
39-
4036
RUN apt-get update -qq \
4137
&& apt-get upgrade -y \
4238
&& apt-get install -y --no-install-recommends \
@@ -74,7 +70,9 @@ RUN apt-get install -y --no-install-recommends \
7470
r-base-dev \
7571
r-base-core
7672

73+
7774
# Install R packages
75+
COPY ./src/test/scripts/installDependencies.R installDependencies.R
7876
RUN Rscript installDependencies.R \
7977
&& rm -rf installDependencies.R \
8078
&& rm -rf /var/lib/apt/lists/*
@@ -86,4 +84,9 @@ RUN wget -qO- https://github.com/microsoft/SEAL/archive/refs/tags/v3.7.0.tar.gz
8684
&& cmake --build build \
8785
&& cmake --install build
8886

87+
# Finally copy the entrypoint script
88+
# This is last to enable quick updates to the script after initial local build.
89+
COPY ./docker/entrypoint.sh /entrypoint.sh
90+
91+
8992
ENTRYPOINT ["/entrypoint.sh"]

0 commit comments

Comments
 (0)