You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitlink_help_center/Dockerfile

24 lines
528 B

# 使用官方Node.js镜像
FROM node:18-alpine
LABEL maintainer="hejiayu <hejy47@nudt.edu.cn>"
WORKDIR /gitlink_help_center
# 设置 npm 和 yarn 使用淘宝镜像
RUN npm config set registry https://registry.npmmirror.com && \
yarn config set registry https://registry.npmmirror.com
# 创建必要的目录
RUN mkdir -p docs versioned_docs/version-1.1.0
# 复制所有文件
COPY . .
# 安装依赖并构建
RUN yarn install && \
yarn build --locale zh-cn
# 暴露端口
EXPOSE 3000
CMD ["npm", "run", "serve"]