Skip to content

Commit

Permalink
Update Dockerfile (#58)
Browse files Browse the repository at this point in the history
1. The project `dockerize` is not being used.

2. Uses the Microsoft Build of OpenJDK
  • Loading branch information
brunoborges committed May 2, 2023
1 parent cb80ac7 commit d24506c
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
FROM eclipse-temurin:17 as builder
FROM mcr.microsoft.com/openjdk/jdk:17-mariner as builder
WORKDIR application
ARG ARTIFACT_NAME
COPY ${ARTIFACT_NAME}.jar application.jar
RUN java -Djarmode=layertools -jar application.jar extract

# Download dockerize and cache that layer
ARG DOCKERIZE_VERSION
RUN wget -O dockerize.tar.gz https://github.com/jwilder/dockerize/releases/download/${DOCKERIZE_VERSION}/dockerize-alpine-linux-amd64-${DOCKERIZE_VERSION}.tar.gz
RUN tar xzf dockerize.tar.gz
RUN chmod +x dockerize


FROM eclipse-temurin:17
FROM mcr.microsoft.com/openjdk/jdk:17-mariner

WORKDIR application

# Dockerize
COPY --from=builder application/dockerize ./

ARG EXPOSED_PORT
EXPOSE ${EXPOSED_PORT}

Expand Down

0 comments on commit d24506c

Please sign in to comment.