Skip to content
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
24 changes: 24 additions & 0 deletions Dockerfile.checkpoint-aarch64
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
ARG BASE_IMAGE=ubuntu:24.04
ARG JDK_NAME=zulu21.44.17-ca-crac-jdk21.0.8-linux.aarch64

FROM $BASE_IMAGE AS builder
ARG JDK_NAME

RUN apt-get update && apt-get install -y wget
RUN wget -O crac-jdk.tar.gz https://cdn.azul.com/zulu/bin/$JDK_NAME.tar.gz
RUN tar zxf ./crac-jdk.tar.gz -C /usr/share

# End of builder

FROM $BASE_IMAGE
ARG JDK_NAME
ARG FAT_JAR=

ENV JDK_NAME=$JDK_NAME
ENV JAVA_HOME=/usr/share/$JDK_NAME

COPY --from=builder /usr/share/${JDK_NAME} /usr/share/${JDK_NAME}
RUN ln -s $JAVA_HOME/bin/java /bin/ && ln -s $JAVA_HOME/bin/jcmd /bin/
ADD target/example-spring-boot*.jar /example-spring-boot.jar
ENTRYPOINT [ "java", "-XX:CRaCCheckpointTo=/cr", "-jar", "/example-spring-boot.jar" ]

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ $JAVA_HOME/bin/java -XX:CRaCRestoreFrom=cr
```
docker build -f Dockerfile.checkpoint -t example-spring-boot-checkpoint .
```
> If you're on a Mac with Apple silicon (M1, M2, M3, etc), use `Dockerfile.checkpoint-aarch64` instead.

2. Start a (detached) container that will be checkpointed. Note that we're mounting `target/cr` into the container.
```
Expand Down