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
3f94829d
Commit
3f94829d
authored
Nov 22, 2021
by
liuzicheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Dockerfile
parent
5b6e896e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
16 deletions
+2
-16
Dockerfile
Dockerfile
+2
-16
No files found.
Dockerfile
View file @
3f94829d
# build stage
FROM
node:16-alpine3.14 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
cnpm
install
less-loader@5.0.0
-S
# 构建
RUN
npm run build:staging
# production stage
# 使用nginx镜像
FROM
nginx:stable-alpine as production-stage
FROM
nginx:stable-alpine
# 使用--from把上面产生的静态文件复制到nginx的运行目录
COPY
--from=build-stage appdist usrsharenginx
html
COPY
dist usr/share/nginx/
html
# nginx容器内部暴露的端口
EXPOSE
8064
# 运行的命令
...
...
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