Created
March 17, 2017 11:33
-
-
Save alexei-led/4b90ca2dcb24c1f8dc19ccd1e72c6ad3 to your computer and use it in GitHub Desktop.
Dockerize Java-Maven project
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
FROM maven:{{}} | |
# make source folder | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
# install maven packages | |
COPY pom.xml /usr/src/app | |
CMD ["mvn", "install"] |
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
FROM openjdk:8-jre-alpine | |
COPY spring-boot-*.war /app.war | |
CMD ["/usr/bin/java", "-jar", "-Dspring.profiles.active=test", "/app.war"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment