Skip to content

Commit

Permalink
Test docker actions #14, change chmod
Browse files Browse the repository at this point in the history
  • Loading branch information
sabexzero committed Apr 20, 2024
1 parent 79db23d commit 4b036bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
Expand Down
11 changes: 3 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ WORKDIR /app

COPY build.gradle .
COPY settings.gradle .
COPY gradlew .
COPY gradle ./gradle/
COPY gradlew .sss
COPY .gradle ./gradle/

COPY src ./src/

Expand All @@ -14,20 +14,15 @@ RUN apt-get update && \
apt-get clean \

RUN sudo dos2unix gradlew
RUN sudo chmod +x gradlew
RUN sudo chmod 777 gradlew
RUN sudo ./gradlew lib:build

# Use a lighter base image for the runtime
FROM openjdk:latest

# Set the working directory in the container
WORKDIR /app

# Copy the built JAR file from the build stage to the runtime image
COPY --from=build /app/build/libs/*.jar app.jar

# Expose the port the application runs on
EXPOSE 8080

# Specify the command to run the application
CMD ["java", "-jar", "app.jar"]

0 comments on commit 4b036bf

Please sign in to comment.