Skip to content

Commit

Permalink
Update to eclipse-temurin:21 and remove appuser (#4675)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
james-m-henderson authored Sep 14, 2024
1 parent 811b7fd commit 0fd88ba
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:11 AS builder
FROM eclipse-temurin:21 AS builder

WORKDIR /opt/antlr4

Expand All @@ -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"]


0 comments on commit 0fd88ba

Please sign in to comment.