-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (23 loc) · 979 Bytes
/
Copy pathDockerfile
File metadata and controls
34 lines (23 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This is a Dockerfile for province microservice application
# Use an official Java 8 runtime as parent image
FROM maven:3.6.1-jdk-8-alpine
VOLUME /tmp
# Set maintainer email id
MAINTAINER devsolibill@gmail.com
# Set the working directory contents into the container at /app
WORKDIR /app
# Copy the current directory contents into the container at /app
ADD . /app
# Build and create jar using maven command
RUN mvn package -DskipTests=true -Ddir=app
# Copy the current directory contents into the container at /app
ADD target/psolibill.jar provinces-psolibill.jar
# Make port 8988 available to the world outside this container
EXPOSE 8988
# Define environment variable
ENV JAVA_OPTS=""
# Adding a 2nd build stage for having a minimal container image that can be deployed in production
#FROM scratch
#COPY /app /app
# Run psolibill.jar when the container launches
ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar provinces-psolibill.jar"]