Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]容器构建停止后编辑重启Command解析错误 #6568

Open
JAINKRE opened this issue Sep 24, 2024 · 2 comments
Open

[BUG]容器构建停止后编辑重启Command解析错误 #6568

JAINKRE opened this issue Sep 24, 2024 · 2 comments
Assignees

Comments

@JAINKRE
Copy link

JAINKRE commented Sep 24, 2024

联系方式

No response

1Panel 版本

v1.10.16-lts

问题描述

dockerfile中构建容器命令:

CMD ["sh", "-c", "uwsgi --ini uwsgi.ini & nginx -g 'daemon off;'"]

构建成功后启动容器无误

但是,停止容器后编辑容器任意内容,重启容器,启动失败

通过排除发现,Command启动命令被解析错误

重现步骤

自行构建docker镜像:

docker run -d -p 8127:443 --name DevBuild.jainkre_python3flask-fk.4ddfc9aa jainkre_python3flask-fk:dev-build.4ddfc9aa

简单来说容器是一个flask项目,使用uwsgi作为服务,nginx作为反向代理。

构建产物直接输出在目标机器上,机器由1panel管理

此时,启动该容器成功:

image

容器状态一切正常:

image

停止容器,进行任意操作,比如修改容器名称:

image

此时Command显示:

'sh' '-c' 'uwsgi --ini uwsgi.ini & nginx -g 'daemon off;''

image

然后重启容器,失败,报错:

image

查看容器Command

image

而容器构建正确启动命令为:
image

期待的正确结果

赶紧修复一下吧,应该是转义符的问题

一直以为是构建和命令问题,反复排除了几个小时,才发现是面板导致的。。。。

相关日志输出

No response

附加信息

No response

@ssongliu
Copy link
Collaborator

ssongliu commented Sep 25, 2024

感谢反馈,麻烦提供容器 inspect Cmd 部分的截图,方便的话可以加一下我

image

@JAINKRE
Copy link
Author

JAINKRE commented Sep 25, 2024

感谢反馈,麻烦提供容器 inspect Cmd 部分的截图,方便的话可以加一下我

已申请

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants