Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jdubois committed Dec 12, 2017
2 parents 7c01810 + fadf2a8 commit 2761304
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ RUN \

FROM openjdk:8-jre-alpine
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
JAVA_OPTS="" \
SPRING_PROFILES_ACTIVE=prod,native \
GIT_URI=https://github.com/jhipster/jhipster-registry/ \
GIT_SEARCH_PATHS=central-config
EXPOSE 8761
COPY --from=builder /jhipster-registry.war .
RUN mkdir /target && \
chmod g+rwx /target
CMD ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/jhipster-registry.war","--spring.cloud.config.server.git.uri=${GIT_URI}","--spring.cloud.config.server.git.search-paths=${GIT_SEARCH_PATHS}"]
CMD java \
${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom \
-jar /jhipster-registry.war \
--spring.cloud.config.server.git.uri=${GIT_URI} \
--spring.cloud.config.server.git.search-paths=${GIT_SEARCH_PATHS}

COPY --from=builder /jhipster-registry.war .
9 changes: 5 additions & 4 deletions src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM openjdk:8-jre-alpine

ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
JAVA_OPTS="" \
JHIPSTER_SLEEP=0

# add directly the war
ADD *.war /app.war

VOLUME /tmp
EXPOSE 8761
CMD echo "The application will start in ${JHIPSTER_SLEEP}s..." && \
sleep ${JHIPSTER_SLEEP} && \
java -Djava.security.egd=file:/dev/./urandom -jar /app.war
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /app.war

# add directly the war
ADD *.war /app.war

0 comments on commit 2761304

Please sign in to comment.