-
Notifications
You must be signed in to change notification settings - Fork 1
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 #2 from boomerang-io/bug-dockerfile
Update Dockerfile
- Loading branch information
Showing
1 changed file
with
17 additions
and
6 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,8 +1,19 @@ | ||
FROM adoptopenjdk/openjdk11:latest | ||
FROM adoptopenjdk/openjdk11-openj9:jdk-11.0.5_10_openj9-0.17.0-alpine-slim | ||
ARG BMRG_TAG | ||
VOLUME /tmp | ||
EXPOSE 7716 | ||
ADD target/service-repository-$BMRG_TAG.jar service.jar | ||
RUN sh -c 'touch /service.jar' | ||
ENV JAVA_OPTS="" | ||
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /service.jar" ] | ||
ENV BMRG_HOME=/opt/boomerang | ||
ENV BMRG_SVC=service-repository-$BMRG_TAG | ||
|
||
WORKDIR $BMRG_HOME | ||
ADD target/$BMRG_SVC.jar service.jar | ||
RUN sh -c 'touch /service.jar' | ||
|
||
# Create user, chown, and chmod. | ||
# OpenShift requires that a numeric user is used in the USER declaration instead of the user name | ||
RUN chmod -R u+x $BMRG_HOME \ | ||
&& chgrp -R 0 $BMRG_HOME \ | ||
&& chmod -R g=u $BMRG_HOME | ||
USER 2000 | ||
|
||
EXPOSE 8080 | ||
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar ./service.jar" ] |