Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
f39e8188
Commit
f39e8188
authored
Aug 04, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
321665c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
Dockerfile
+10
-8
No files found.
Dockerfile
View file @
f39e8188
# 使用 Nginx 基础镜像
FROM
nginx:1.25-alpine
# 安装 Node.js 和基本依赖
# 设置时区
ENV
TZ=Asia/Shanghai
RUN
ln
-snf
/usr/share/zoneinfo/
$TZ
/etc/localtime
&&
echo
$TZ
>
/etc/timezone
# 使用阿里云镜像源替换 Alpine 官方源
RUN
echo
"https://mirrors.aliyun.com/alpine/v3.19/main"
>
/etc/apk/repositories
&&
\
echo
"https://mirrors.aliyun.com/alpine/v3.19/community"
>>
/etc/apk/repositories
# 安装 Node.js 和基本依赖(使用阿里云源加速)
RUN
apk add
--no-cache
\
nodejs
\
npm
\
curl
\
bash
# 设置时区
ENV
TZ=Asia/Shanghai
RUN
ln
-snf
/usr/share/zoneinfo/
$TZ
/etc/localtime
&&
echo
$TZ
>
/etc/timezone
# 设置工作目录
WORKDIR
/app
# 复制项目文件
COPY
. .
# 配置 npm 镜像源
(简化版)
# 配置 npm 镜像源
为淘宝源
RUN
npm config
set
registry https://registry.npmmirror.com
# 复制自定义 Nginx 配置
...
...
@@ -26,5 +30,3 @@ COPY nginx.conf /etc/nginx/conf.d/app.conf
# 暴露端口
EXPOSE
8333
# 注意:这里不设置默认 CMD,将在运行时指定
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