1 Star 0 Fork 0

北京大学计算与数字经济研究院/SCOW

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile.scow 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
# Copyright (c) 2022 Peking University and Peking University Institute for Computing and Digital Economy
# SCOW is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
# See the Mulan PSL v2 for more details.
FROM node:iron-alpine@sha256:f4c96a28c0b2d8981664e03f461c2677152cd9a756012ffa8e2c6727427c2bda AS base
RUN apk update
FROM base as builder
RUN apk add libc6-compat python3 make gcc g++ curl git
RUN corepack enable
WORKDIR /app
COPY pnpm-lock.yaml .
COPY patches ./patches
RUN pnpm fetch
COPY . .
RUN pnpm i --offline --frozen-lockfile
RUN node scripts/createVersionFile.mjs version.json
RUN pnpm build --filter="!docs"
RUN node scripts/copyDist.mjs
WORKDIR /app/dist
COPY patches ./patches
RUN pnpm i --offline --prod --frozen-lockfile
# delete next.js build caches to reduce 200MB+ image size
RUN rm -rf apps/mis-web/.next/cache apps/portal-web/.next/cache apps/ai/.next/cache
FROM base AS runner
RUN apk add nginx
WORKDIR /app
COPY --from=builder /app/dist .
COPY --from=builder /app/version.json ./
COPY docker/entrypoint.sh .
RUN chmod +x entrypoint.sh
ENV NODE_ENV production
EXPOSE 3000 80 5000
ENTRYPOINT [ "./entrypoint.sh" ]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/pku_icode/SCOW.git
git@gitee.com:pku_icode/SCOW.git
pku_icode
SCOW
SCOW
master

搜索帮助