Create docker file
Some checks failed
Build / build (push) Failing after 7m52s

This commit is contained in:
2025-06-08 16:09:29 +02:00
parent 72c006f520
commit bbb3448994
2 changed files with 15 additions and 7 deletions

View File

@@ -7,13 +7,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
- name: Setup Java
uses: actions/setup-java@v4
with:
go-version: '>=1.24'
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '21'
cache: 'gradle'
- name: Build
run: go build .
- name: Test
run: go test . -v
run: ./gradlew build --no-daemon

9
Dockerfile Normal file
View File

@@ -0,0 +1,9 @@
FROM eclipse-temurin:21-jdk-alpine AS builder
WORKDIR /app
COPY . /app
RUN ./gradlew jar --no-daemon
FROM eclipse-temurin:21-alpine
COPY --from=builder /app/build/libs/pcinv-0.0.1-SNAPSHOT.jar ./
ENTRYPOINT ["java", "-jar", "pcinv-0.0.1-SNAPSHOT.jar"]
EXPOSE 8088/tcp