File tree Expand file tree Collapse file tree 7 files changed +169
-0
lines changed Expand file tree Collapse file tree 7 files changed +169
-0
lines changed Original file line number Diff line number Diff line change
1
+ * .tar
Original file line number Diff line number Diff line change
1
+ FROM node:22-alpine
2
+
3
+ RUN apk add --no-cache git curl
4
+
5
+ # 设置工作目录
6
+ WORKDIR /app
7
+
8
+ # 克隆指定的 GitHub 仓库
9
+ RUN git clone https://github.com/reactjs/zh-hans.react.dev.git
10
+
11
+ WORKDIR /app/zh-hans.react.dev
12
+
13
+ # 安装项目依赖
14
+ RUN yarn
15
+
16
+ # 构建项目
17
+ RUN yarn run build
18
+
19
+ # 暴露 3333 端口
20
+ EXPOSE 3000
21
+
22
+ # 启动项目
23
+ CMD ["yarn" , "run" , "start" ]
Original file line number Diff line number Diff line change
1
+ # 使用 Alpine 作为基础镜像,Alpine 是一个非常小的 Linux 发行版
2
+ FROM node:22-alpine
3
+
4
+ # 安装 git,因为 Alpine 默认不包含 git
5
+ RUN apk add --no-cache git
6
+
7
+ # 设置工作目录
8
+ WORKDIR /app
9
+
10
+ # 克隆指定的 GitHub 仓库
11
+ RUN git clone https://github.com/xyflow/web.git
12
+
13
+ # 进入克隆的仓库目录
14
+ WORKDIR /app/web
15
+
16
+ # 安装 pnpm(Alpine 镜像中默认没有 pnpm)
17
+ RUN npm install -g pnpm
18
+
19
+ # 安装项目依赖
20
+ RUN pnpm install
21
+
22
+ # 构建项目
23
+ RUN pnpm run build
24
+
25
+ WORKDIR /app/web/sites/reactflow.dev
26
+
27
+ EXPOSE 3000
28
+
29
+ # 启动项目
30
+ CMD ["pnpm" , "run" , "start" ]
Original file line number Diff line number Diff line change
1
+ # 使用 Alpine 作为基础镜像,Alpine 是一个非常小的 Linux 发行版
2
+ FROM node:22-alpine
3
+
4
+ # 安装 git,因为 Alpine 默认不包含 git
5
+ RUN apk add --no-cache git
6
+
7
+ # 设置工作目录
8
+ WORKDIR /app
9
+
10
+ # 克隆指定的 GitHub 仓库
11
+ RUN git clone https://github.com/react-hook-form/documentation.git
12
+
13
+ # 进入克隆的仓库目录
14
+ WORKDIR /app/documentation
15
+
16
+ # 安装 pnpm(Alpine 镜像中默认没有 pnpm)
17
+ RUN npm install -g pnpm
18
+
19
+ # 安装项目依赖
20
+ RUN pnpm install
21
+
22
+ # 构建项目
23
+ RUN pnpm run build
24
+
25
+ EXPOSE 3000
26
+
27
+ # 启动项目
28
+ CMD ["pnpm" , "run" , "start" ]
Original file line number Diff line number Diff line change
1
+ # 使用 Alpine 作为基础镜像,Alpine 是一个非常小的 Linux 发行版
2
+ FROM node:22-alpine
3
+
4
+ # 安装 git,因为 Alpine 默认不包含 git
5
+ RUN apk add --no-cache git
6
+
7
+ # 设置工作目录
8
+ WORKDIR /app
9
+
10
+ # 克隆指定的 GitHub 仓库
11
+ RUN git clone https://github.com/shadcn-ui/ui.git
12
+
13
+ # 进入克隆的仓库目录
14
+ WORKDIR /app/ui
15
+
16
+ # 安装 pnpm(Alpine 镜像中默认没有 pnpm)
17
+ RUN npm install -g pnpm
18
+
19
+ # 安装项目依赖
20
+ RUN pnpm install
21
+
22
+ # 进入 www 目录(假设仓库中有 www 目录)
23
+ WORKDIR /app/ui/apps/www
24
+
25
+ # 构建项目
26
+ RUN pnpm run build
27
+
28
+ # 暴露 3333 端口
29
+ EXPOSE 3333
30
+
31
+ # 启动项目
32
+ CMD ["pnpm" , "run" , "start" ]
Original file line number Diff line number Diff line change
1
+ # Use Node.js as the base image
2
+ FROM node:22-alpine AS base
3
+
4
+ # Install git and other dependencies
5
+ RUN apk add --no-cache git
6
+
7
+ # Install pnpm (package manager used in the project)
8
+ RUN corepack enable && corepack prepare pnpm@latest --activate
9
+
10
+ # Set working directory
11
+ WORKDIR /app
12
+
13
+ # Clone the repository
14
+ RUN git clone https://github.com/tailwindlabs/tailwindcss.com.git .
15
+
16
+ # Install dependencies
17
+ RUN pnpm install --frozen-lockfile
18
+
19
+ # Build the application
20
+ RUN pnpm build
21
+
22
+ # Expose port
23
+ EXPOSE 3000
24
+
25
+ # Set the command to run the application
26
+ CMD ["pnpm" ,"run" , "start" ]
Original file line number Diff line number Diff line change
1
+ # 使用 Node.js 22 Alpine 镜像,Alpine 是一个轻量级的 Linux 发行版
2
+ FROM node:22-alpine
3
+
4
+ # 创建 tanstack 目录并设置为工作目录
5
+ RUN mkdir -p /tanstack
6
+ WORKDIR /tanstack
7
+
8
+ # 安装 git,因为 Alpine 镜像默认不包含 git
9
+ RUN apk add --no-cache git
10
+
11
+ # 拉取各个项目
12
+ RUN git clone https://github.com/gptkong/tanstack.com.git
13
+ RUN git clone https://github.com/TanStack/query.git
14
+ RUN git clone https://github.com/TanStack/router.git
15
+ RUN git clone https://github.com/TanStack/table.git
16
+
17
+ # 进入 tanstack.com 目录
18
+ WORKDIR /tanstack/tanstack.com
19
+
20
+ # 安装依赖,使用 pnpm
21
+ RUN npm install -g pnpm
22
+ RUN pnpm i
23
+ RUN pnpm build
24
+
25
+ # 暴露 3000 端口
26
+ EXPOSE 3000
27
+
28
+ # 运行开发服务器
29
+ CMD ["node" , ".output/server/index.mjs" ]
You can’t perform that action at this time.
0 commit comments