Files
netneutrality/Dockerfile
T
2024-05-09 15:34:41 -04:00

27 lines
519 B
Docker

FROM eclipse-temurin:17-jdk-alpine as build
COPY .mvn/ .mvn
COPY mvnw pom.xml ./
COPY src ./src
COPY bot.properties.example bot.properties ./
RUN ["chmod", "+x", "./mvnw"]
RUN ./mvnw install
FROM eclipse-temurin:17-jre-alpine
RUN apk add netcat-openbsd
RUN apk add curl
WORKDIR /app
ARG API_PORT=9000
EXPOSE ${API_PORT}
COPY bot.properties.example bot.properties ./
COPY startup.sh ./
COPY --from=build /target/netneutrality-jar-with-dependencies.jar ./
RUN ["chmod", "+x", "./startup.sh"]
CMD ["./startup.sh"]