Skip to content

Commit

Permalink
update final version of working Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ravishn committed Feb 24, 2020
1 parent 9f84945 commit 472da34
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# FROM gradle:4.7.0-jdk8-alpine
# LABEL maintainer="Ravish Nagaraj"
# WORKDIR /src
# COPY build/libs .
# RUN gradle build

#Use Alpine JDK 8 docker image to run the application
FROM openjdk:8-jdk-alpine

WORKDIR /src
COPY /src ./src/
#Use root as working directory
WORKDIR /

#Copy /src for running build and initial data set-up queries for the API
COPY /src ./src

EXPOSE 8080
#Use this port to run the application
EXPOSE 8085

#Create a new directory to copy built JAR file
RUN mkdir /api

#Copy the built JAR file of the application into api folder
COPY /build/libs/openflightsapi-1.0.0.jar /api/openfligthsapi.jar

#Entrypoint command to run when Docker container is started
ENTRYPOINT ["java", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCGroupMemoryLimitForHeap", "-Djava.security.egd=file:/dev/./urandom","-jar","/api/openfligthsapi.jar"]

0 comments on commit 472da34

Please sign in to comment.