Skip to content

Instantly share code, notes, and snippets.

@iconnor
Created July 11, 2019 05:55
Show Gist options
  • Save iconnor/cd87fab289896c3203c90ad0a8625b54 to your computer and use it in GitHub Desktop.
Save iconnor/cd87fab289896c3203c90ad0a8625b54 to your computer and use it in GitHub Desktop.
Java SpringBoot
FROM openjdk:8-jdk-alpine
RUN apk update \
&& apk add --no-cache curl
HEALTHCHECK --interval=5s --timeout=5s --retries=12 \
CMD curl --silent --fail localhost:8080/actuator/health || exit 1
VOLUME /tmp
ADD target/yourapp-SNAPSHOT.jar app.jar
ENV SPRING_PROFILES_ACTIVE cloud-dev
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment