Update docker build process
This commit is contained in:
1 parent
f79ab8984a
commit
fa93bf6af4
3 files changed
+24
-19
No files matched your search
+15
-10
@@ -1,22 +1,27 @@
|
||||
FROM openjdk:17-jdk-slim
|
||||
FROM eclipse-temurin:17-jdk-alpine as build
|
||||
|
||||
RUN apt-get -y update
|
||||
RUN apt-get -y install netcat
|
||||
RUN apt-get -y install curl
|
||||
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 .mvn/ .mvn
|
||||
COPY mvnw pom.xml ./
|
||||
COPY src ./src
|
||||
COPY bot.properties.example bot.properties ./
|
||||
COPY startup.sh ./
|
||||
|
||||
RUN ["chmod", "+x", "./mvnw"]
|
||||
RUN ./mvnw install
|
||||
COPY --from=build /target/netneutrality-jar-with-dependencies.jar ./
|
||||
|
||||
RUN ["chmod", "+x", "./startup.sh"]
|
||||
CMD ["./startup.sh"]
|
||||
Reference in new issue
Block a user