From 6e15e8f496910c5ac0ef77ab0efbe9f0b1ec662e Mon Sep 17 00:00:00 2001 From: Erlend Hamnaberg Date: Tue, 3 Feb 2026 19:15:29 +0100 Subject: [PATCH 1/2] fix docker arm64 build --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f9b1a7e..3fb3d63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,7 @@ RUN mvn clean package -Dmaven.test.skip=true # Stage 2: Create the final runtime image FROM eclipse-temurin:25-jre-jammy AS final +ARG TARGETARCH # Install unzip and curl RUN apt-get update -y && \ @@ -17,7 +18,7 @@ RUN apt-get update -y && \ rm -rf /var/lib/apt/lists/* # Install SOPS -RUN curl -L -o /usr/local/bin/sops https://github.com/getsops/sops/releases/download/v3.11.0/sops-v3.11.0.linux.amd64 && \ +RUN curl -L -o /usr/local/bin/sops https://github.com/getsops/sops/releases/download/v3.11.0/sops-v3.11.0.linux.$TARGETARCH && \ chmod +x /usr/local/bin/sops # Install AWS CLI v2 From d664358999c0197a3990580b19794fa97fb86b2b Mon Sep 17 00:00:00 2001 From: Erlend Hamnaberg Date: Tue, 3 Feb 2026 19:25:55 +0100 Subject: [PATCH 2/2] Fix this --- .dockerignore | 1 - Dockerfile | 15 ++------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.dockerignore b/.dockerignore index 9592910..eef15fe 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,5 @@ .git cdk/ -target/ test/ node_modules/ *.md diff --git a/Dockerfile b/Dockerfile index 3fb3d63..00484e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,4 @@ -# Build: docker build -t moresleep-app:latest . -# Run: docker run --name moresleep-container -p 5000:5000 moresleep-app:latest -# Check localhost:5000 and you should get a homepage -# Stage 1: Build the application -FROM maven:3.9.12-eclipse-temurin-25 AS build -WORKDIR /app -COPY pom.xml . -COPY src ./src -RUN mvn clean package -Dmaven.test.skip=true - -# Stage 2: Create the final runtime image -FROM eclipse-temurin:25-jre-jammy AS final +FROM eclipse-temurin:25-jre-jammy ARG TARGETARCH # Install unzip and curl @@ -28,7 +17,7 @@ RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "/tmp/aws rm -rf /tmp/aws /tmp/awscliv2.zip WORKDIR /app -COPY --from=build /app/target/cake-redux-jar-with-dependencies.jar app.jar +COPY target/cake-redux-jar-with-dependencies.jar app.jar COPY ./config/.enc.prod.env /app/.enc.env # Remove AWS profile from SOPS config to use container's AWS credentials