【发布时间】:2020-06-06 11:21:12
【问题描述】:
我已经看到很多关于退出代码“3221225781”的问题,以响应 docker RUN,但我仍然无法找到答案。考虑这个 dockerfile:
FROM mcr.microsoft.com/dotnet/core/runtime:3.1
WORKDIR /app
ADD https://aka.ms/vs/16/release/vc_redist.x64.exe vc_redist.x64.exe
RUN VC_redist.x64.exe /install /quiet /norestart /log vc_redist.log
运行时,我得到以下输出:
C:\test>docker image build -t exitcodetest:1.0 .
Sending build context to Docker daemon 113.2MB
Step 1/4 : FROM mcr.microsoft.com/dotnet/core/runtime:3.1
---> 3be5e0b7f3a5
Step 2/4 : WORKDIR /app
---> Using cache
---> 4508bead23e2
Step 3/4 : ADD https://aka.ms/vs/16/release/vc_redist.x64.exe vc_redist.x64.exe
Downloading [==================================================>] 15.06MB/15.06MB
---> 37322d63b677
Step 4/4 : RUN VC_redist.x64.exe /install /quiet /norestart /log vc_redist.log
---> Running in c57b67befa33
The command 'cmd /S /C VC_redist.x64.exe /install /quiet /norestart /log vc_redist.log' returned a non-zero code: 3221225781
为什么我会收到此退出代码?这是什么意思?我还确认没有写入 vc_redist.log。
有人知道我可以做些什么来让它工作吗?
我应该补充一点,当我在本地机器上运行该命令时,它会起作用,并返回零 %ERRORLEVEL%。
谢谢!
【问题讨论】:
标签: docker dockerfile