Skip to content

Commit

Permalink
Added workdir
Browse files Browse the repository at this point in the history
  • Loading branch information
qtsathish committed Mar 26, 2021
1 parent 378a60d commit 9d58075
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Mar21/ENVARGDemo/EnvDemo/Dockerfile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ LABEL author="khaja ibrahim"
LABEL maintainer="qtdevops@gmail.com" LABEL maintainer="qtdevops@gmail.com"
ENV applicationpath='/springpetclinic.jar' ENV applicationpath='/springpetclinic.jar'
ENV dummy='dummy' ENV dummy='dummy'
ARG downloadlocation ENV workingdirectory='/spc'
ARG downloadlocation='https://referenceappkhaja.s3-us-west-2.amazonaws.com/spring-petclinic-2.2.0.BUILD-SNAPSHOT.jar'
RUN mkdir ${workingdirectory}
WORKDIR ${workingdirectory}
# Downloading the image from the url # Downloading the image from the url
ADD ${downloadlocation} ${applicationpath} ADD ${downloadlocation} "${workingdirectory}/${applicationpath}"
# spring pet clinic runs on port 8080 # spring pet clinic runs on port 8080
EXPOSE 8080 EXPOSE 8080
# command to start the application # command to start the application
CMD ["java", "-jar", ${applicationpath} ] CMD ["java", "-jar", "${workingdirectory}/${applicationpath}" ]

0 comments on commit 9d58075

Please sign in to comment.