Skip to content

Commit

Permalink
[releng] Use node alpine version to reduce docker image size
Browse files Browse the repository at this point in the history
Signed-off-by: Axel RICHARD <[email protected]>
  • Loading branch information
AxelRICHARD committed Nov 7, 2024
1 parent afbe113 commit eebfb45
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions backend/application/syson-application/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM node:18.7-slim
FROM node:18.7-alpine
RUN adduser --disabled-password myuser
RUN apt-get update && apt-get install -y openjdk-17-jre && apt-get clean cache
COPY target/syson-application-2024.11.0.jar ./app.jar
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 \;
EXPOSE 8080
USER myuser
ENTRYPOINT ["java","-jar","/app.jar"]
ENTRYPOINT ["java","-jar","/syson-application.jar"]

0 comments on commit eebfb45

Please sign in to comment.