FROM registry.cn-shanghai.aliyuncs.com/devcon/node:18
ARG PACKAGE
ENV PACKAGE $PACKAGE
ADD . /app
WORKDIR /app
RUN mkdir -p /app/log
RUN cd /app && \
    chmod +x start.sh && \
    npm config set registry https://registry.npmmirror.com/ && \
    npm config set "@batiao:registry" https://maven.batiao8.com/repository/npm-releases/ && \
    npm install && \
    npm run build
EXPOSE 9270
CMD [ "/app/start.sh" ]
