From 135b342d2f74cfc8e1077cea56199d4064a16845 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 12 Aug 2024 12:34:41 -0400 Subject: [PATCH] Update to eclipse-temurin:21 and remove appuser It seems this appuser wasn't being used at all, and the USER line wasn't being set to enable it. In addition, the adduser utility didn't exist in the old or updated version of temurin. This seems simpler and works. Signed-off-by: James --- docker/Dockerfile | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index e0c6614072..c5c2a9e655 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:11 AS builder +FROM eclipse-temurin:21 AS builder WORKDIR /opt/antlr4 @@ -14,23 +14,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install maven git - && mvn -DskipTests install --projects tool --also-make \ && mv ./tool/target/antlr4-*-complete.jar antlr4-tool.jar -FROM eclipse-temurin:11-jre - -ARG user=appuser -ARG group=appuser -ARG uid=1000 -ARG gid=1000 - -RUN adduser \ - --disabled-password \ - --gecos "" \ - --home "$(pwd)" \ - --no-create-home \ - --uid "${uid}" \ - "${user}" +FROM eclipse-temurin:21-jre COPY --from=builder /opt/antlr4/antlr4/antlr4-tool.jar /usr/local/lib/ WORKDIR /work ENTRYPOINT ["java", "-Xmx500M", "-cp", "/usr/local/lib/antlr4-tool.jar", "org.antlr.v4.Tool"] - -