diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 7f6e3ac..1e184e7 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -14,6 +14,16 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 + - name: Validate Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + check-latest: true + - name: Build with Gradle + run: ./gradlew build - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Log into registry ${{ env.REGISTRY }} diff --git a/Dockerfile b/Dockerfile index c3c4b65..83bbf03 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,4 @@ -FROM --platform=$BUILDPLATFORM gradle:jdk17 as builder -WORKDIR /build -COPY build.gradle settings.gradle gradle.properties ./ -COPY .git .git -COPY src src -RUN gradle --no-daemon build - FROM --platform=$TARGETPLATFORM eclipse-temurin:21-jre-alpine -WORKDIR /app -COPY --from=builder /build/build/libs/ViaProxy-*.jar ViaProxy.jar -ENTRYPOINT ["java", "-jar", "ViaProxy.jar"] \ No newline at end of file +WORKDIR /app/run +COPY /build/libs/ViaProxy-*.jar /app/ViaProxy.jar +ENTRYPOINT ["java", "-jar", "/app/ViaProxy.jar", "config", "viaproxy.yml"]