增加Dockerfile,支持以Docker容器模式运行。

This commit is contained in:
Peng Xiao
2018-01-05 14:23:09 +08:00
parent 40fe20dba4
commit 4c01e3e30e
2 changed files with 15 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
FROM mhart/alpine-node:8
WORKDIR /app
COPY . /app
RUN npm install
EXPOSE 3000
CMD ["node", "app.js"]
+6
View File
@@ -180,6 +180,12 @@ windows 下使用 git-bash 或者 cmder 等终端执行以下命令:
$ set PORT=4000 && node app.js $ set PORT=4000 && node app.js
``` ```
## Docker容器运行
```shell
docker pull pengxiao/netease-music-api
docker run -d -p 3000:3000 pengxiao/netease-music-api
```
## 使用文档 ## 使用文档
[文档地址](https://binaryify.github.io/NeteaseCloudMusicApi) [文档地址](https://binaryify.github.io/NeteaseCloudMusicApi)