mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-12-22 16:38:04 +01:00
ca4014f130
* Add Dockerfile * Add Docker build workflow * Make the image be tagged with commit sha and latest * Fix naming of builder layer * Switch to eclipse temurin for run image * Try using java 22 * nvm 21 it is * Install git in image * That wasn't the problem, copy .git now * Remove chown's cuz not needed * 17? * Add newline at the end of docker workflow * Only build container image on push to main
11 lines
367 B
Docker
11 lines
367 B
Docker
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"] |