From ffdbfed87f9a5afdf74400d7514d0c53ae0b284e Mon Sep 17 00:00:00 2001 From: Lavender Shannon Date: Wed, 18 Dec 2024 16:15:49 -0600 Subject: [PATCH] Docker images use ubuntu noble jre base image, solarthing docker image now has nc installed --- build.gradle | 2 +- docker/solarthing-server/Dockerfile | 4 ++-- docker/solarthing/Dockerfile | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 2f8ea55b..3bee1631 100644 --- a/build.gradle +++ b/build.gradle @@ -169,7 +169,7 @@ subprojects { error("PackageLocation") // warn("ParameterMissingNullable") // This is useful. Maybe uncomment if we become more religious about use of @Nullable error("PrivateConstructorForUtilityClass") // not completely ideal for spring classes with static initialization - warn("RemoveUnusedImports") + warn("RemoveUnusedImports") // Only a warning because https://github.com/antlr/antlr4/issues/2568 and https://github.com/google/error-prone/issues/463 // warn("ReturnMissingNullable") // Useful onlyl if we become more religious about use of @Nullable warn("ReturnsNullCollection") warn("SwitchDefault") diff --git a/docker/solarthing-server/Dockerfile b/docker/solarthing-server/Dockerfile index 82fa8747..27d8f13f 100644 --- a/docker/solarthing-server/Dockerfile +++ b/docker/solarthing-server/Dockerfile @@ -1,10 +1,10 @@ -FROM ghcr.io/retrodaredevil/lavender-jre:21-ubuntu-jammy as builder +FROM ghcr.io/retrodaredevil/lavender-jre:21-ubuntu-noble as builder ARG JAR_LOCATION COPY ${JAR_LOCATION} application.jar RUN java -Djarmode=layertools -jar application.jar extract -FROM ghcr.io/retrodaredevil/lavender-jre:21-ubuntu-jammy +FROM ghcr.io/retrodaredevil/lavender-jre:21-ubuntu-noble RUN ["mkdir", "/solarthing"] WORKDIR "/solarthing" diff --git a/docker/solarthing/Dockerfile b/docker/solarthing/Dockerfile index 940f128b..4a27f6cf 100644 --- a/docker/solarthing/Dockerfile +++ b/docker/solarthing/Dockerfile @@ -1,8 +1,14 @@ -FROM ghcr.io/retrodaredevil/lavender-jre:21-ubuntu-jammy +FROM ghcr.io/retrodaredevil/lavender-jre:21-ubuntu-noble ARG JAR_LOCATION ARG COMMIT_HASH="" ARG REF="" +# Install netcat because users may want to run nc to access configuration server +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends netcat-openbsd && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + RUN ["mkdir", "/solarthing"] COPY --chmod=0444 ${JAR_LOCATION} /solarthing/solarthing.jar ENV DOCKER=""