From 9a1405743bce7260d88b0ac11fe71e48d40c646c Mon Sep 17 00:00:00 2001 From: tangxinyue <524779910@qq.com> Date: Fri, 24 Jul 2026 14:44:57 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E7=BD=B2Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 14 ++++++++++++++ start.sh | 4 ++++ 2 files changed, 18 insertions(+) create mode 100644 Dockerfile create mode 100644 start.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2b4ae69 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM registry.cn-shanghai.aliyuncs.com/devcon/node:18 +ARG PACKAGE +ENV PACKAGE $PACKAGE +ADD . /app +WORKDIR /app +RUN mkdir /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" ] diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..af809b9 --- /dev/null +++ b/start.sh @@ -0,0 +1,4 @@ +cd /app +while [ true ];do + nohup npm run start +done