Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile 无法正常使用 #15

Closed
qfdk opened this issue Apr 23, 2017 · 1 comment
Closed

Dockerfile 无法正常使用 #15

qfdk opened this issue Apr 23, 2017 · 1 comment

Comments

@qfdk
Copy link
Contributor

qfdk commented Apr 23, 2017

使用 docker build -t blog . 进行docker 打包测试未能成功.

错误提示如下

npm ERR! Linux 4.9.13-moby
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "yarn" "pm2"
npm ERR! node v7.7.4
npm ERR! npm  v4.1.2
npm ERR! path /usr/local/bin/yarn
npm ERR! code EEXIST

npm ERR! Refusing to delete /usr/local/bin/yarn: node_modules/npm/bin/npm-cli.js symlink target is not controlled by npm /usr/local
npm ERR! File exists: /usr/local/bin/yarn
npm ERR! Move it away, and try again.

npm ERR! Please include the following file with any support request:
npm ERR!     /npm-debug.log
The command '/bin/sh -c npm install -g yarn pm2' returned a non-zero code: 1

似乎现在改成了用 yarn 管理的方式

建议 docker 打成直接可运行的包(加上 mongo 和 redis)

还有个问题为什么要用 redis ?

@qfdk qfdk closed this as completed Apr 23, 2017
@smallpath
Copy link
Owner

  • yarn可以解决国内国外的网络问题
  • 直接加mongo redis太大了
    • 因为配置文件支持传环境变量,分出去的话可以直接指定host
  • redis目前只用来存了token,但是之后会做一层SortedSet缓存

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants