Docker:容器继续重新启动

编程入门 行业动态 更新时间:2024-10-28 20:19:38
本文介绍了Docker:容器继续重新启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我今天使用appcontainers / mediawiki docker映像部署了MediaWiki实例,但是现在遇到了一个新问题,无法找到任何线索。 尝试使用以下方式附加到mediawiki前端容器后:

docker attach mediawiki_web_1

由于我忽略的原因,它在我的配置中回答了 Terminated ,还尝试了: / p>

docker exec -it mediawiki_web_1 bash

我确实收到错误消息附近的内容:

守护程序的错误响应:Container 81c07e4a69519c785b12ce4512a8ec76a10231ecfb30522e714b0ae53a0c9c68 is重新启动,等到容器正在运行

这是我的新问题,因为此容器永不停止重新启动。我可以看到,使用 docker ps -a 总是返回重启(127)x秒前的状态。 / p>

问题是,我能够停止容器(经过测试),但是再次启动它似乎使它回到了重新启动的循环中。

任何想法在这里可能是什么问题?直到我尝试附加它为止,整个过程都正常工作了。

我很伤心:-(

解决方案

docker日志 命令将向您显示不以交互方式运行容器时容器正在生成的输出。 $ p> docker日志--tail 50 --follow --timestamps mediawiki_web_1

您还可以使用 docker run -ti< your_wiki_image> 在前台运行一个新容器,以查看其作用,您可能需要从 docker-compose yml到 docker 命令。

猜测附加到媒体Wiki进程会导致崩溃,从而损坏您的数据。

I today deployed an instance of MediaWiki using the appcontainers/mediawiki docker image, and I now have a new problem for which I cannot find any clue. After trying to attach to the mediawiki front container using:

docker attach mediawiki_web_1

which answers Terminated on my configuration for a reason I ignore, trying also:

docker exec -it mediawiki_web_1 bash

I do get something close to an error message:

Error response from daemon: Container 81c07e4a69519c785b12ce4512a8ec76a10231ecfb30522e714b0ae53a0c9c68 is restarting, wait until the container is running

And there is my new problem, because this container never stop restarting. I can see that using docker ps -a which always returns a STATUS of Restarting (127) x seconds ago.

The thing is, I am able to stop the container (I tested) but starting it again seems to bring it back into its restarting loop.

Any idea what could be the issue here ? The whole thing was properly working until I tried to attach to it...

I am sad :-(

解决方案

The docker logs command will show you the output a container is generating when you don't run it interactively. This is likely to include the error message.

docker logs --tail 50 --follow --timestamps mediawiki_web_1

You can also run a fresh container in the foreground with docker run -ti <your_wiki_image> to see what that does. You may need to map some config from your docker-compose yml to the docker command.

I would guess that attaching to the media wiki process caused a crash which has corrupted something in your data.

更多推荐

Docker:容器继续重新启动

本文发布于:2023-10-25 14:38:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1527247.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:重新启动   容器   Docker

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!