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