-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update final version of working Dockerfile
- Loading branch information
Showing
1 changed file
with
11 additions
and
9 deletions.
There are no files selected for viewing
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
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"] |