-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (20 loc) · 861 Bytes
/
Dockerfile
File metadata and controls
30 lines (20 loc) · 861 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
#This is a Dockerfile for a microservice application
# Use an official Java 8 runtime as a parent image
FROM maven:3.5-jdk-8-alpine
VOLUME /tmp
#Set maintainer email id
MAINTAINER [email protected]
# Set the working directory to /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/AccountServiceDocker-0.0.1-SNAPSHOT.jar accounts-microservice.jar
# Make port 8080 available to the world outside this container
EXPOSE 8080
# Define environment variable
ENV JAVA_OPTS=""
# Run accounts-microservice.jar when the container launches
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar accounts-microservice.jar" ]