Skip to content

Commit

Permalink
[releng] Dockerfile structure upgrade to be based on temurin
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Escande <[email protected]>
  • Loading branch information
GuillaumeEscande authored and AxelRICHARD committed Dec 2, 2024
1 parent 8677343 commit a4244a3
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions backend/application/syson-application/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
FROM node:18.7-alpine
RUN adduser --disabled-password myuser
RUN wget -O /etc/apk/keys/adoptium.rsa.pub https://packages.adoptium.net/artifactory/api/security/keypair/public/repositories/apk
RUN echo 'https://packages.adoptium.net/artifactory/apk/alpine/main' >> /etc/apk/repositories
RUN apk update && apk add temurin-17-jre
COPY target/syson-application-*.jar ./
RUN find ./ -name '*.jar' ! -name '*-sources.jar' -exec mv {} syson-application.jar \;
FROM eclipse-temurin:17-jre-alpine
RUN apk add --update-cache --no-cache nodejs=20.15.1-r0 npm=10.9.1-r0 && rm -rf /var/cache/apk/*
RUN adduser --disabled-password syson
COPY target/syson-application*[^sources].jar /syson-application.jar
EXPOSE 8080
USER myuser
ENTRYPOINT ["java","-jar","/syson-application.jar"]
USER syson
ENTRYPOINT ["java","-jar","/syson-application.jar"]

0 comments on commit a4244a3

Please sign in to comment.