大网数据广告活动
服务器运维问答

How to get detailed error message using docker-compose up? I can only see "command returned non-zero code"

· 52CE 我爱测

I'm trying to run my docker-container on linux. During build I'm encountering an error after running this command: sudo docker-compose -f docker-compose.yml up --build docker-compose shows this message: Step 10/19 : RUN dotnet re…

问题原文

原帖链接 · Piotrek · CC BY-SA 4.0

I'm trying to run my docker-container on linux. During build I'm encountering an error after running this command:

sudo docker-compose -f docker-compose.yml up --build

docker-compose shows this message:

Step 10/19 : RUN dotnet restore "test/test.csproj"
 ---> Running in ea65364853f3
standard_init_linux.go:211: exec user process caused "exec format error"
ERROR: Service 'test' failed to build: The command '/bin/sh -c dotnet restore "test/test.csproj"' returned a non-zero code: 1

Is there any way I can see detailed error message?

已采纳解答

原帖链接 · Matt Zimmerman · CC BY-SA 4.0

The error is occurring during the build process. You should see the same results when you run docker-compose build.

This error:

standard_init_linux.go:211: exec user process caused "exec format error"

means that Docker tried to run the dotnet executable inside the container, but it couldn't start because the dotnet binary in the image is incompatible with the environment in the container. Perhaps it is compiled for a different architecture, or something like that? If you show the rest of your build process (steps 1-9) we can probably spot the problem for you.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-07-30)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。