Skip to content

Commit

Permalink
build(docker): bump to java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
lgdd committed Apr 16, 2024
1 parent 2d09105 commit b9f64d1
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions Dockerfile.jvm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM azul/zulu-openjdk-alpine:11 AS builder
FROM azul/zulu-openjdk-alpine:17 AS builder

RUN apk add --repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ --no-cache \
nodejs \
Expand All @@ -20,7 +20,7 @@ COPY src src

RUN ./mvnw package

FROM azul/zulu-openjdk-alpine:11
FROM alpine:3.14

ENV DEPLOYMENTS=/deployments
ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
Expand All @@ -29,14 +29,19 @@ ENV PATH=$PATH:/home/node/.npm-global/bin
ENV PATH=$PATH:/home/node/.npm-global/lib
ENV NODE_ENV=production

ARG RUN_JAVA_VERSION=1.3.5
ARG RUN_JAVA_VERSION=1.3.8

RUN wget -P /etc/apk/keys/ \
https://cdn.azul.com/public_keys/alpine-signing@azul.com-5d5dc44c.rsa.pub
RUN echo "https://repos.azul.com/zulu/alpine" | tee -a /etc/apk/repositories

RUN addgroup -g 1000 node \
&& adduser -u 1000 -G node -s /bin/sh -D node \
&& apk add --no-cache \
&& apk add -U --no-cache \
curl \
nodejs \
npm \
zulu17-jdk \
&& mkdir /deployments \
&& chown node $DEPLOYMENTS \
&& chmod "g+rwX" $DEPLOYMENTS \
Expand All @@ -54,14 +59,16 @@ RUN blade update && \
blade version

RUN npm i -g yarn \
&& yarn global add yo
&& yarn global add yo@3.1.0

RUN yarn global add generator-old-liferay-theme@npm:generator-liferay-theme@^8.0.0 \
&& yarn global add generator-liferay-theme \
&& yarn global add generator-liferay-theme@10.1.0 \
&& yarn global add generator-liferay-js

COPY --from=builder "/workspace/target/lib/*" "$DEPLOYMENTS/lib/"
COPY --from=builder "/workspace/target/*-runner.jar" "$DEPLOYMENTS/app.jar"
COPY --from=builder "/workspace/target/quarkus-app/lib/" "$DEPLOYMENTS/lib/"
COPY --from=builder "/workspace/target/quarkus-app/*.jar" "$DEPLOYMENTS/"
COPY --from=builder "/workspace/target/quarkus-app/app/" "$DEPLOYMENTS/app/"
COPY --from=builder "/workspace/target/quarkus-app/quarkus/" "$DEPLOYMENTS/quarkus/"

EXPOSE 8080

Expand Down

0 comments on commit b9f64d1

Please sign in to comment.