Dockerfile 521 字节
FROM node:22-alpine

RUN apk add --no-cache tzdata && \
    cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && \
    apk del tzdata

RUN mkdir -p /app
WORKDIR /app

COPY ./package.json /app
COPY ./build /app/build
COPY ./config /app/config

# RUN npm config set registry https://registry.npmmirror.com && \
#     npm install --production

RUN npm install -g cnpm
RUN cnpm install --production

COPY ./job-executor /app/node_modules/job-executor

CMD [ "node","build/index.js"]