Created
May 1, 2018 18:36
-
-
Save JohnZavyn/30d1a773a9535f964c670d7e219f77ab to your computer and use it in GitHub Desktop.
Docker file to run an exploded Spring Boot WAR
This file contains hidden or 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
FROM openjdk:8-alpine | |
ENV TZ America/New_York | |
RUN ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime | |
RUN echo "${TZ}" > /etc/timezone | |
# Declare the working directory | |
WORKDIR /microservice | |
# Copy and explode the WAR to the working directory | |
COPY my-application/target/*-exec.war /microservice.war | |
RUN jar xvf /microservice.war | |
RUN rm /microservice.war | |
# RUN the microservice | |
ENTRYPOINT ["java", "org.springframework.boot.loader.WarLauncher"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment