Docker Community Forums

Share and learn in the Docker community.

Error 0x80070003: Failed to create archive file stream

I am getting error while building docker image -
as Temp\CollectInfo.txt

[160](http://gitlab-gls.dmsystems-uk.local/platform/system/SSE/-/jobs/12078#L160)Error 0x80070003: Failed to create archive file stream.

[161](http://gitlab-gls.dmsystems-uk.local/platform/system/SSE/-/jobs/12078#L161)]

[162](http://gitlab-gls.dmsystems-uk.local/platform/system/SSE/-/jobs/12078#L162)The command 'cmd /S /C c:\Temp\Install.cmd C:\Temp\vs_buildtools.exe modify --quiet --wait --norestart --nocache --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" --channelUri C:\Temp\VisualStudio.chman --installChannelUri C:\Temp\VisualStudio.chman --add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools;includeRecommended --add Microsoft.VisualStudio.Workload.VCTools;includeRecommended --add Microsoft.Component.MSBuild --add Microsoft.VisualStudio.Component.VC.ATLMFC' returned a non-zero code: 1

[163](http://gitlab-gls.dmsystems-uk.local/platform/system/SSE/-/jobs/12078#L163)make: *** [makefile:5: build_DockerImage] Error 1

[165](http://gitlab-gls.dmsystems-uk.local/platform/system/SSE/-/jobs/12078#L165)ERROR: Job failed: exit status 1

My dockerfile details is -

# escape=`
# Let us use PowerShell line continuation.

FROM mcr.microsoft.com/dotnet/framework/sdk:4.8

# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]

# Download the Visual Studio Build Tools bootstrapper.
ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\Temp\vs_buildtools.exe

# Use the latest release channel.
ADD https://aka.ms/vs/16/release/channel C:\Temp\VisualStudio.chman
# Set up environment to collect install errors.
COPY Install.cmd C:\Temp\
ADD https://aka.ms/vscollect.exe C:\Temp\collect.exe

# For help on command-line syntax:
# https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio
# Modify MSVC C++ compiler, CMake, and MSBuild.
#RUN c:\Temp\\Install.cmd C:\Temp\vs_buildtools.exe `
#    --quiet --wait --norestart --nocache `
#    --installPath C:\BuildTools `
#    --channelUri C:\Temp\VisualStudio.chman `
#    --installChannelUri C:\Temp\VisualStudio.chman `
#    --all `
 #|| IF "%ERRORLEVEL%"=="3010" EXIT 0
RUN c:\Temp\Install.cmd C:\Temp\vs_buildtools.exe modify `
    --quiet --wait --norestart --nocache `
    --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" `
    --channelUri C:\Temp\VisualStudio.chman `
    --installChannelUri C:\Temp\VisualStudio.chman `
    --add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools;includeRecommended `
    --add Microsoft.VisualStudio.Workload.VCTools;includeRecommended `
    --add Microsoft.Component.MSBuild `
    --add Microsoft.VisualStudio.Component.VC.ATLMFC

# Start developer command prompt with any other commands specified.
#ENTRYPOINT C:\BuildTools\Common7\Tools\VsDevCmd.bat &&
WORKDIR /src
ENTRYPOINT ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
#CMD ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]

# Default to PowerShell if no other command specified.

Please let me know what is gap, this error has broken the pipeline.

Since I don’t use Windows images and I really don’t know what the failing command does, I don’t think I can help, but I fixed your post so at least someone can understand your question. Please, always use the code block button (</>) to insert codes or console outputs because the markdown filter will change your message drastically and it can be hard for us to find what part of your message is code and what part of it comes from you. I hope I was able to fix your message.

So one thing is sure. The roblem is with this command:

cmd /S /C c:\Temp\Install.cmd C:\Temp\vs_buildtools.exe modify --quiet --wait --norestart --nocache --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" --channelUri C:\Temp\VisualStudio.chman --installChannelUri C:\Temp\VisualStudio.chman --add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools;includeRecommended --add Microsoft.VisualStudio.Workload.VCTools;includeRecommended --add Microsoft.Component.MSBuild --add Microsoft.VisualStudio.Component.VC.ATLMFC

In order to find the reason, you need someone with more knowledge about Windows and Visual Studio or try to run the command in verbose mode if it is possible.