Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
egg-websocket
Project
Project
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
huanglu
egg-websocket
Commits
a46009a5
Commit
a46009a5
authored
Mar 08, 2021
by
huanglu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Dockerfile 文件
parent
0cfce6d0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
Dockerfile
Dockerfile
+29
-0
No files found.
Dockerfile
0 → 100644
View file @
a46009a5
# node镜像
FROM
node:12-alpine
# 设置时区
RUN
apk
--update
add tzdata
\
&&
cp
/usr/share/zoneinfo/Asia/Shanghai /etc/localtime
\
&&
echo
"Asia/Shanghai"
>
/etc/timezone
\
&&
apk del tzdata
# 这个是容器中的文件目录
RUN
mkdir
-p
/usr/app
# 设置工作目录
WORKDIR
/usr/app
COPY
package.json /usr/app/package.json
# 安装npm依赖(使用淘宝的镜像源)
# 如果使用的境外服务器,无需使用淘宝的镜像源,即改为`RUN npm i`。
RUN
npm i
--registry
=
https://registry.npm.taobao.org
# 拷贝所有源代码到工作目
COPY
. /usr/app
# 暴露容器端口
EXPOSE
3008
CMD
npm run start
\ 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