Skip to content

Commit 511f5b5

Browse files
authored
Merge pull request #134 from harshal-rembhotkar/feat/dockerfile
Update: Dockerfile
2 parents e199b32 + e10b90c commit 511f5b5

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

.github/workflows/draft-pdf.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
# This should be the path to the paper within your repo.
1515
paper-path: paper.md
1616
- name: Upload
17-
uses: actions/upload-artifact@v1
17+
uses: actions/upload-artifact@v4
18+
1819
with:
1920
name: paper
2021
# This is the output path where Pandoc will write the compiled

Dockerfile.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
FROM openjdk:latest
2-
COPY . /src
3-
WORKDIR /src
1+
FROM openjdk:17-jdk-alpine
42

3+
WORKDIR /app
4+
5+
# Only copy the JAR if it exists
6+
COPY ./target/concore-0.0.1-SNAPSHOT.jar /app/concore.jar || true
7+
8+
# Ensure the JAR file is executable if present
9+
RUN [ -f /app/concore.jar ] && chmod +x /app/concore.jar || true
10+
11+
EXPOSE 3000
12+
13+
# Run Java app only if the JAR exists, otherwise do nothing
14+
CMD ["/bin/sh", "-c", "if [ -f /app/concore.jar ]; then java -jar /app/concore.jar; else echo 'No Java application found, exiting'; fi"]

0 commit comments

Comments
 (0)