ViaProxy/Dockerfile
veronoicc ca4014f130
Add Dockerfile and automated image building (#213)
* 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
2024-06-29 14:50:53 +02:00

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"]