Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1
Commits
6b37eb70
Commit
6b37eb70
authored
Oct 26, 2022
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Dockerfile
parent
2a482e6c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
Dockerfile
Dockerfile
+14
-11
No files found.
Dockerfile
View file @
6b37eb70
FROM
nginx
#RUN rm -rf /usr/share/nginx/html/*
RUN
rm
-rf
/etc/nginx/conf.d/
*
#COPY dist /usr/share/nginx/html
COPY
nginx.conf /etc/nginx/conf.d/
COPY
docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT
["sh","/usr/local/bin/docker-entrypoint.sh"]
# build stage
FROM
node:12-alpine as build-stage
WORKDIR
/app
COPY
package*.json ./
RUN
npm config
set
sass_binary_site https://npm.taobao.org/mirrors/node-sass
-g
&&
npm config
set
registry https://registry.npm.taobao.org
RUN
npm install
COPY
. .
RUN
npm run build
# production stage
FROM
nginx:stable-alpine as production-stage
COPY
--from=build-stage /app/dist /usr/share/nginx/html
EXPOSE
80
CMD
["nginx", "-g", "daemon off;"]
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