Skip to content

Commit

Permalink
👻 Make Dockerfile.init multi-stage
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Montleon <[email protected]>
  • Loading branch information
jmontleon committed Apr 12, 2023
1 parent ca82bf5 commit 2ef797e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
*
!target/tackle-keycloak-theme-*.jar
10 changes: 7 additions & 3 deletions Dockerfile.init
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
FROM registry.access.redhat.com/ubi9/ubi-minimal

ADD target/tackle-keycloak-theme-*.jar /
FROM registry.access.redhat.com/ubi9/ubi-minimal as builder
RUN microdnf -y install maven-openjdk11.noarch
ADD . /tackle-keycloak-theme
WORKDIR /tackle-keycloak-theme
RUN mvn clean install

FROM registry.access.redhat.com/ubi9/ubi-minimal
COPY --from=builder /tackle-keycloak-theme/target/tackle-keycloak-theme-*.jar /
ENTRYPOINT [ "sh", "-c", "cp /tackle-keycloak-theme-* /deployments" ]

0 comments on commit 2ef797e

Please sign in to comment.