Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
inc-validator/Dockerfile
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
33 lines (27 sloc)
745 Bytes
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
# | |
# Dockerfile for inc-validator. | |
# | |
# Performed as a two-stage build so that we can use Maven to generate the application | |
# but not have it (and the things it downloads) clutter up the deployed image. | |
# | |
# | |
# Build the .jar file in a build container. | |
# | |
FROM maven:3.5.3-jdk-8 AS build-jar | |
MAINTAINER Ian Young <ian@iay.org.uk> | |
WORKDIR /user | |
COPY pom.xml ./ | |
COPY swagger swagger | |
COPY src src | |
RUN mvn --batch-mode \ | |
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ | |
package | |
# | |
# Build the deployable image. | |
# | |
FROM openjdk:8-slim | |
MAINTAINER Ian Young <ian@iay.org.uk> | |
WORKDIR /user | |
COPY --from=build-jar /user/target/*.jar . | |
EXPOSE 8080 | |
CMD ["java", "-jar", "inc-validator-0.0.1-SNAPSHOT.jar"] |