为了账号安全,请及时绑定邮箱和手机立即绑定

执行docker-compose up

Attaching to ghost_db_1, ghost_ghost-app_1, ghost_nginx_1
db_1         | Initializing database
db_1         | 2018-01-09T04:09:52.145515Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
db_1         | 2018-01-09T04:09:52.147605Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
db_1         | 2018-01-09T04:09:52.147639Z 0 [ERROR] Aborting
db_1         |
nginx_1      | 2018/01/09 04:09:54 [emerg] 1#1: host not found in upstream "ghost-app" in /etc/nginx/nginx.conf:7
ghost-app_1  | npm ERR! Linux 4.4.0-87-generic
nginx_1      | nginx: [emerg] host not found in upstream "ghost-app" in /etc/nginx/nginx.conf:7
ghost-app_1  | npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" "--production"
ghost-app_1  | npm ERR! node v6.12.3
ghost-app_1  | npm ERR! npm  v3.10.10
ghost-app_1  | npm ERR! path /var/lib/ghost/package.json
ghost-app_1  | npm ERR! code ENOENT
ghost-app_1  | npm ERR! errno -2
ghost-app_1  | npm ERR! syscall open
ghost_db_1 exited with code 1
ghost-app_1  |
ghost-app_1  | npm ERR! enoent ENOENT: no such file or directory, open '/var/lib/ghost/package.json'
ghost-app_1  | npm ERR! enoent ENOENT: no such file or directory, open '/var/lib/ghost/package.json'
ghost-app_1  | npm ERR! enoent This is most likely not a problem with npm itself
ghost-app_1  | npm ERR! enoent and is related to npm not being able to find a file.
ghost-app_1  | npm ERR! enoent
ghost-app_1  |
ghost-app_1  | npm ERR! Please include the following file with any support request:
ghost-app_1  | npm ERR!     /var/lib/ghost/npm-debug.log
ghost_ghost-app_1 exited with code 254
ghost_nginx_1 exited with code 1

正在回答

2 回答

是不是现在的ghost image已经有了启动命令,所以要注释掉

0 回复 有任何疑惑可以回复我~

root@ubuntu:~/ghost# cat ghost/Dockerfile
FROM ghost
COPY ./config.js /var/lib/ghost/config.js
EXPOSE 2368
#CMD ["npm","start","--production"]

将ghost下的Dockerfile里的CMD注释掉解决

6 回复 有任何疑惑可以回复我~
#1

learning_exe

虽然不知道为啥,但老哥你完美的解决了我的问题,nb
2018-02-06 回复 有任何疑惑可以回复我~
#2

learning_exe

能解释下更好了
2018-02-06 回复 有任何疑惑可以回复我~
#3

edgex 回复 learning_exe

知道为什么了么,我也想知道
2018-07-12 回复 有任何疑惑可以回复我~
#4

大西瓜瓜瓜瓜

你好,已经按照你的方法解决问题了,请问是怎么得到这个答案的?
2019-12-22 回复 有任何疑惑可以回复我~
查看1条回复

举报

0/150
提交
取消

执行docker-compose up

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信