mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-02 20:08:40 +08:00
26 lines
912 B
Docker
26 lines
912 B
Docker
FROM maven:3.8.4-jdk-8-slim as builder
|
|
WORKDIR /target/dependency
|
|
COPY . .
|
|
|
|
RUN curl -Lso /opt/node-v16.13.1-linux-x64.tar.gz https://npmmirror.com/mirrors/node/v16.13.1/node-v16.13.1-linux-x64.tar.gz \
|
|
&& tar -zxvf /opt/node-v16.13.1-linux-x64.tar.gz -C /opt/ && export PATH=/opt/node-v16.13.1-linux-x64/bin:$PATH \
|
|
&& npm config set registry https://registry.npmmirror.com \
|
|
&& cd web-vue && npm install && npm run build
|
|
|
|
RUN mvn -B -e -T 1C clean package -pl modules/server -am -Dmaven.test.skip=true -Dmaven.compile.fork=true -s script/settings.xml
|
|
|
|
FROM maven:3.8.4-jdk-8-slim
|
|
ENV JPOM_HOME /usr/local/jpom-server
|
|
ARG JPOM_VERSION
|
|
ENV JPOM_PKG server-${JPOM_VERSION}-release
|
|
WORKDIR $JPOM_HOME
|
|
ARG DEPENDENCY=/target/dependency
|
|
COPY --from=builder ${DEPENDENCY}/modules/server/target/${JPOM_PKG} ${JPOM_HOME}
|
|
|
|
VOLUME $JPOM_HOME
|
|
EXPOSE 2122
|
|
|
|
ENTRYPOINT ["/bin/bash", "Server.sh", "start"]
|
|
|
|
|