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] docker部署提示[: line 0: syntax error: unexpected end of file (expecting "then") #5641

Closed
SDCOM-0415 opened this issue Oct 11, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@SDCOM-0415
Copy link

📦 部署方式

Docker

📌 软件版本

2024.10.11的docker latest版本

💻 系统环境

Other Linux

📌 系统版本

Debian12.6(fnOS 属于nas系统)

🌐 浏览器

Edge

📌 浏览器版本

129.0.2792.79

🐛 问题描述

docker部署后提示[: line 0: syntax error: unexpected end of file (expecting "then")
还没有运行起来就报错退出了
image
image
image
运行方式参考https://bbs.naixi.net/thread-1174-1-1.html
image
docker镜像为1p镜像

📷 复现步骤

直接运行

🚦 期望结果

能够成功运行

📝 补充信息

No response

@SDCOM-0415 SDCOM-0415 added the bug Something isn't working label Oct 11, 2024
@luojiyin1987
Copy link

Copy link
Contributor

你可以覆盖一下 docker的cmd 启动,传自己平台支持的命令就好了

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


You can override docker's cmd startup and pass the commands supported by your platform.
![](https://gitmaya.com/api/667ce442a7fe4d0012d239e6/667ce4449d2ddb00149623e5/om_ab5cae97b9682c5cab7c33774a835c4d/image/img_v3_02fj_2833e150-6f50-43 12-9864-8edcb21e43cg)

@SDCOM-0415
Copy link
Author

你可以覆盖一下 docker的cmd 启动,传自己平台支持的命令就好了

不会修改啊,而且其他项目似乎运行正常

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


You can override the cmd startup of docker and pass the command supported by your platform! [](https://camo.githubusercontent.com/fb8c3f5caa53a19f5fe05f1bb1edd46dd598371266afa850937c370f413c59f0/68747470733a2f2f6769746d 6179612e636f6d2f6170692f3636376365343432613766653464303031326 432333965362f3636376365343434396432646462303031343936323365352 f6f6d5f6162356361653937623936383263356361623763333373734613833356334642f696d6167652f696d675f76335f3032666a5f32383333653135 302d366635302d343331322d393836342d386564636232316534336367)

It won’t be modified, and other projects seem to be running normally.

@SDCOM-0415
Copy link
Author

SDCOM-0415 commented Oct 12, 2024

https://stackoverflow.com/questions/18155852/syntax-error-end-of-file-unexpected-expecting-then 应该是 不同平台上换行符的问题。

不太可能吧,因为那是win配置文件到Linux吧

@luojiyin1987
Copy link

https://stackoverflow.com/questions/18155852/syntax-error-end-of-file-unexpected-expecting-then 应该是 不同平台上换行符的问题。

不太可能吧,因为那是win配置文件到Linux吧

那你提供更多的信息。 你用的容器运行时, 对应的 docker compose 文件。 你可以尝试使用strace 进行动态跟踪。

@lloydzhou
Copy link
Contributor

@SDCOM-0415
我说的覆盖cmd指的是,通过控制启动docker的命令,覆盖内置的cmd

Docker 文档
image

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


@SDCOM-0415
What I mean by overwriting cmd is to overwrite the built-in cmd by controlling the command to start docker.

Docker Documentation
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants