Skip to content

Commit

Permalink
Set the workdir to a place where we can write files
Browse files Browse the repository at this point in the history
  • Loading branch information
halprin committed Aug 27, 2024
1 parent 3798dcb commit 69f2114
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ USER myLowPrivilegeUser
ARG JAR_LIB_FILE=./app/build/libs/app-all.jar

# Create directory and switch to it
#WORKDIR /home/myLowPrivilegeUser/app
WORKDIR /usr/local/bin/
WORKDIR /home/myLowPrivilegeUser/app/

# Add application JAR to created folder
COPY --chown=myLowPrivilegeUser ${JAR_LIB_FILE} app.jar
COPY --chown=myLowPrivilegeUser ${JAR_LIB_FILE} /usr/local/bin/app.jar

# Run the api
CMD ["java", "-jar", "app.jar"]
CMD ["java", "-jar", "/usr/local/bin/app.jar"]

# Use port 8080
EXPOSE 8080

0 comments on commit 69f2114

Please sign in to comment.