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
是不是现在的ghost image已经有了启动命令,所以要注释掉
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注释掉解决