Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
贷
贷超管理后台
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
zhanhai
贷超管理后台
Commits
ab071c4c
Commit
ab071c4c
authored
Nov 22, 2021
by
liuzicheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
ced24a30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
Dockerfile
Dockerfile
+20
-0
No files found.
Dockerfile
0 → 100644
View file @
ab071c4c
# build stage
FROM
node12-alpine as build-stage
# 创建一个工作目录
WORKDIR
app
# 复制符合.dockerignore规则的文件
COPY
. .
# 安装依赖
RUN
npm
install
cnpm
-g
--no-progress
--registry
=
httpsregistry.npm.taobao.org
RUN
cnpm
install
--no-progress
# 构建
RUN
npm run build
# production stage
# 使用nginx镜像
FROM
nginxstable-alpine as production-stage
# 使用--from把上面产生的静态文件复制到nginx的运行目录
COPY
--from=build-stage appdist usrsharenginxhtml
# nginx容器内部暴露的端口
EXPOSE
8064
# 运行的命令
CMD
[nginx, -g, daemon off;]
\ No newline at end of file
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