schools-api/Dockerfile
2023-09-18 20:54:35 +02:00

12 lines
324 B
Docker

FROM gradle:7-jdk11 AS build
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
RUN gradle buildFatJar --no-daemon
FROM openjdk:11
EXPOSE 3002
RUN mkdir /app
COPY --from=build /home/gradle/src/.env /home/gradle/src/build/libs/*.jar /app/
ENV PORT=3002
ENTRYPOINT ["java","-jar","/app/schools-all.jar"]