criu/scripts/build/Dockerfile.hotspot-ubuntu
Radostin Stoyanov a72bf212ec scripts: improve layer caching of container builds
The scripts installing dependencies are now copied and executed before
copying the full source tree. This allows to cache the dependency
installation layers as long as these scripts remain unchanged.
Previously, copying the entire repository invalidated the cache on every
source change. While our CI intentionally doesn't preserve cached layers
across independent runs, the changes in this patch help with local testing
when investigating issues.

Examples:
 - sudo -E make -C scripts/ci alpine GCC=1
 - sudo -E make -C scripts/ci alpine CLANG=1

Suggested-by: Andrei Vagin <avagin@google.com>
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2026-03-09 08:33:03 -07:00

13 lines
420 B
Text

FROM docker.io/library/eclipse-temurin:11-jammy
ARG CC=gcc
COPY contrib/dependencies/apt-packages.sh /criu/contrib/dependencies/apt-packages.sh
COPY contrib/apt-install /criu/contrib/apt-install
WORKDIR /criu
RUN /criu/contrib/apt-install maven "$CC" && contrib/dependencies/apt-packages.sh
COPY . /criu
RUN make mrproper && make -j $(nproc) CC="$CC"
ENTRYPOINT ["mvn", "-q", "-f", "test/javaTests/pom.xml", "test"]