Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
python3.12-node22-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eazy-template
python3.12-node22-template
Commits
ff411655
Commit
ff411655
authored
Sep 13, 2025
by
bin.gong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Dockerfile
parent
b8277862
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Dockerfile
Dockerfile
+4
-4
No files found.
Dockerfile
View file @
ff411655
# 多阶段构建:Python + Node.js 全栈应用
# 多阶段构建:Python + Node.js 全栈应用
FROM
hb.eazytec-cloud.com/eazytec/eazydevelop-python-node:ubuntu22.04-python3.1
1
-node22 AS python-base
FROM
hb.eazytec-cloud.com/eazytec/eazydevelop-python-node:ubuntu22.04-python3.1
2
-node22 AS python-base
# 设置工作目录
# 设置工作目录
WORKDIR
/app
WORKDIR
/app
...
@@ -16,7 +16,7 @@ RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/ &&
...
@@ -16,7 +16,7 @@ RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/ &&
pip
install
--no-cache-dir
-r
backend/requirements.txt
pip
install
--no-cache-dir
-r
backend/requirements.txt
# Node.js 阶段
# Node.js 阶段
FROM
hb.eazytec-cloud.com/eazytec/eazydevelop-python-node:ubuntu22.04-python3.1
1
-node22 AS node-base
FROM
hb.eazytec-cloud.com/eazytec/eazydevelop-python-node:ubuntu22.04-python3.1
2
-node22 AS node-base
# 设置工作目录
# 设置工作目录
WORKDIR
/app
WORKDIR
/app
...
@@ -33,14 +33,14 @@ RUN cd frontend && npm config set registry https://registry.npmmirror.com && \
...
@@ -33,14 +33,14 @@ RUN cd frontend && npm config set registry https://registry.npmmirror.com && \
npm
install
--production
npm
install
--production
# 最终阶段:合并两个服务
# 最终阶段:合并两个服务
FROM
hb.eazytec-cloud.com/eazytec/eazydevelop-python-node:ubuntu22.04-python3.1
1
-node22
FROM
hb.eazytec-cloud.com/eazytec/eazydevelop-python-node:ubuntu22.04-python3.1
2
-node22
# 设置工作目录
# 设置工作目录
WORKDIR
/app
WORKDIR
/app
# 复制 Python 后端
# 复制 Python 后端
COPY
--from=python-base /app/backend/ /app/backend/
COPY
--from=python-base /app/backend/ /app/backend/
COPY
--from=python-base /usr/local/lib/python3.1
1/site-packages/ /usr/local/lib/python3.11
/site-packages/
COPY
--from=python-base /usr/local/lib/python3.1
2/site-packages/ /usr/local/lib/python3.12
/site-packages/
# 复制 Node.js 前端
# 复制 Node.js 前端
COPY
--from=node-base /app/frontend/ /app/frontend/
COPY
--from=node-base /app/frontend/ /app/frontend/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment