Оптимизирован Dockerfile

This commit is contained in:
serega6531
2020-04-05 16:52:04 +03:00
parent 78062273e1
commit c3b36300bf

View File

@@ -1,20 +1,20 @@
FROM openjdk:13-jdk-alpine FROM openjdk:13-jdk-alpine
RUN apk add libpcap npm RUN apk --no-cache add libpcap npm
COPY ./ /app/ COPY ./ /app/
WORKDIR /app/frontend/ WORKDIR /app/frontend/
RUN npm install && npm run build RUN npm install && npm run build && npm cache clean --force \
&& mkdir -p ../src/main/resources/static/ \
RUN mkdir -p ../src/main/resources/static/ \ && mv ./dist/* ../src/main/resources/static/ \
&& cp -rf ./dist/* ../src/main/resources/static/ && rm -rf node_modules
WORKDIR /app/ WORKDIR /app/
RUN ./gradlew --no-daemon build RUN ./gradlew --no-daemon --no-build-cache build \
&& cp build/libs/packmate-*.jar app.jar \
RUN cp build/libs/packmate-*.jar app.jar && ./gradlew --no-daemon clean
EXPOSE 65000:65000 EXPOSE 65000:65000