Skip to content
Permalink
bb91744254
Switch branches/tags

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?
Go to file
 
 
Cannot retrieve contributors at this time
33 lines (27 sloc) 745 Bytes
#
# 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"]