Update Dockerfile

double
fengyujue 2 months ago
parent ce3c34556e
commit 877cde3f82

@ -9,12 +9,25 @@ WORKDIR /gitlink_help_center
RUN npm config set registry https://registry.npmmirror.com && \
yarn config set registry https://registry.npmmirror.com
# 复制项目文件
# 安装构建依赖
RUN apk add --no-cache python3 make g++
# 复制package.json和yarn.lock
COPY package.json yarn.lock ./
# 安装依赖
RUN yarn install --frozen-lockfile
# 复制其余项目文件
COPY . .
# 复制静态资源
COPY static ./static
COPY versioned_docs ./versioned_docs
COPY src ./src
COPY docusaurus.config.js ./
COPY sidebars.js ./
COPY versions.json ./
# 更新browserslist数据库
RUN npx update-browserslist-db@latest
# 构建项目
RUN yarn build --locale zh-cn

Loading…
Cancel
Save