-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from dotdiego/master
multi-stage build for docker
- Loading branch information
Showing
1 changed file
with
7 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
ARG KEYCLOAK_IMAGE | ||
ARG KEYCLOAK_IMAGE=quay.io/keycloak/keycloak:19.0.1 | ||
|
||
FROM $KEYCLOAK_IMAGE | ||
|
||
USER root | ||
|
||
COPY . /project | ||
#RUN cd /project && ./mvnw clean package | ||
FROM maven as builder | ||
COPY pom.xml /tmp/ | ||
COPY src /tmp/src | ||
WORKDIR /tmp/ | ||
RUN mvn clean package | ||
|
||
FROM $KEYCLOAK_IMAGE | ||
USER root | ||
COPY --from=0 /project/target/*.jar /opt/keycloak/providers/app.jar | ||
COPY --from=builder /tmp/target/*.jar /opt/keycloak/providers/app.jar | ||
USER 1000 | ||
|
||
ENTRYPOINT ["/opt/keycloak/bin/kc.sh", "start-dev" , "--features-disabled=admin2"] |