加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 708 Bytes
一键复制 编辑 原始数据 按行查看 历史
linx01 提交于 2024-07-04 18:35 . dockerfile base image update
FROM hub.gitee-ai.com/gitee-ai-internal/node:18 AS base
# Install dependencies only when needed
FROM base AS deps
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
RUN apk add --no-cache libc6-compat
COPY --link package.json yarn.lock .yarnrc /app/
WORKDIR /app
RUN yarn config set registry https://registry.npmmirror.com
RUN yarn install --frozen-lockfile
# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps --link /app /app
COPY --link . /app
RUN yarn build
# Serve with `docusaurus serve`.
FROM base AS runner
WORKDIR /app
COPY --from=builder --link /app /app
EXPOSE 3000
CMD ["yarn", "serve", "--host", "0.0.0.0", "--no-open"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化