Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
backend
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
idatt2106-v23-03
backend
Commits
4565063f
Commit
4565063f
authored
1 year ago
by
Stian Lyng
Browse files
Options
Downloads
Patches
Plain Diff
run jar file from github actions
parent
a2ab8154
Branches
217-add-algotihm-to-find-relevant-statistics
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+3
-21
3 additions, 21 deletions
Dockerfile
with
3 additions
and
21 deletions
Dockerfile
+
3
−
21
View file @
4565063f
...
...
@@ -27,33 +27,15 @@
#EXPOSE 8080
#
# Use the official Maven image as the base image
FROM
eclipse-temurin:19-jre-alpine
as
builder
# Set the working directory
WORKDIR
/app
# Copy the pom.xml file to the working directory
COPY
pom.xml .
RUN
apk add maven
# Download and cache dependencies to improve build times
RUN
mvn dependency:go-offline
# Copy the rest of the application code
COPY
src ./src
# Build the application and package it as a JAR file
RUN
mvn clean package
# Use the official OpenJDK image as the runtime image
# Use the Eclipse Temurin JRE 19 image as the base image
FROM
eclipse-temurin:19-jre-alpine
# Set the working directory
WORKDIR
/app
# Copy the JAR file
from
the
builder stage
COPY
--from=builder /app/target/*
.jar ./app.jar
# Copy the JAR file
to
the
working directory
COPY
your-jar-file
.jar ./app.jar
# Expose the port the application will run on
EXPOSE
8080
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment