我正在尝试在本地主机中查看docker映像。 运行完所有设置后,我运行docker ps并得到:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
73e73358ad00 talk-example_app "./docker/php/init.sh" 17 hours ago Created 9000/tcp, 0.0.0.0:9000->3000/tcp dazzling_galois
66acb4dbebdf nginx:latest "nginx -g 'daemon of…" 17 hours ago Up 17 hours 0.0.0.0:8111->80/tcp talk-example_nginx_1
e8cf5884ad4a talk-example_app "./docker/php/init.sh" 17 hours ago Up 17 hours 9000/tcp talk-example_app_1
e34e2574db56 talk-example_redis "docker-entrypoint.s…" 17 hours ago Up 17 hours 0.0.0.0:63791->6379/tcp talk-example_redis_1
ec44ad9b1c1f mysql:5.7 "docker-entrypoint.s…" 17 hours ago Up 17 hours 33060/tcp, 0.0.0.0:33061->3306/tcp talk-example_database_1
我正在尝试运行映像talk_example_app
。根据该软件包中的文档,我只是应该克隆git repo,然后运行将起作用的命令。我尝试了几个在线阅读的不同docker命令,但在localhost上无法使用任何命令。
如何实现?
添加日志:
2019-09-13 17:01:27,528 INFO exited: talk-worker_01 (exit status 255; not expected)
2019-09-13 17:01:30,540 INFO spawned: 'talk-worker_02' with pid 31
2019-09-13 17:01:30,552 INFO spawned: 'talk-worker_00' with pid 32
2019-09-13 17:01:30,566 INFO spawned: 'talk-worker_01' with pid 33
2019-09-13 17:01:30,645 INFO exited: talk-worker_02 (exit status 255; not expected)
2019-09-13 17:01:30,657 INFO gave up: talk-worker_02 entered FATAL state, too many start retries too quickly
2019-09-13 17:01:30,664 INFO exited: talk-worker_00 (exit status 255; not expected)
答案 0 :(得分:1)
提供的链接假设可以运行4个容器。
docker ps
的Nginx丢失了,它正在监听端口8088
运行docker ps -a
,它将显示已停止的容器,您可能会在其中看到nginx,请检查Nginx停止运行的日志,以为主机8088
可能已被占用。
要检查图像,请运行docker images
并查看图像,以确保nginx将存在。
您可以使用查看日志
docker logs
或
docker compose logs nginx