执行docker-compose up

来源:-

qq_媞吢非_03696675

2018-01-09 12:11

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回答

  • xiaoyu233
    2018-11-01 15:07:33

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

  • qq_媞吢非_03696675
    2018-01-09 15:56:23

    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注释掉解决

    大西瓜瓜瓜瓜

    你好,已经按照你的方法解决问题了,请问是怎么得到这个答案的?

    2019-12-22 00:04:14

    共 4 条回复 >

Docker入门

再不学点Docker你就out啦!

96683 学习 · 242 问题

查看课程

相似问题