sdk-container-builds
sdk-container-builds copied to clipboard
Decompress layer tarballs when when writing to `docker load`
The tarballs-of-tarballs emitted by docker load
have bare .tar
files inside them; ours should presumably look just like that.
However, when naively doing so (7c9a270), I ran into an error:
Test method Test.Microsoft.NET.Build.Containers.Filesystem.EndToEnd.ApiEndToEndWithLocalLoad threw exception:
System.NotSupportedException: This operation is not supported.
Stack Trace:
at System.IO.Compression.GZipStream.get_Length()
at System.Formats.Tar.TarHeader.GetTotalDataBytesToWrite()
at System.Formats.Tar.TarHeader.WriteAsPaxSharedInternal(Span`1 buffer, Int64& actualLength)
at System.Formats.Tar.TarHeader.WriteAsPaxInternalAsync(Stream archiveStream, Memory`1 buffer, CancellationToken cancellationToken)
at System.Formats.Tar.TarHeader.WriteAsPaxAsync(Stream archiveStream, Memory`1 buffer, CancellationToken cancellationToken)
at System.Formats.Tar.TarWriter.WriteEntryAsyncInternal(TarEntry entry, CancellationToken cancellationToken)
at Microsoft.NET.Build.Containers.LocalDocker.WriteImageToStream(Image x, String name, String tag, Stream imageStream) in S:\System.Containers\Microsoft.NET.Build.Containers\LocalDocker.cs:line 75
at Microsoft.NET.Build.Containers.LocalDocker.Load(Image x, String name, String tag, String baseName) in S:\System.Containers\Microsoft.NET.Build.Containers\LocalDocker.cs:line 29
at Test.Microsoft.NET.Build.Containers.Filesystem.EndToEnd.ApiEndToEndWithLocalLoad() in S:\System.Containers\Test.Microsoft.NET.Build.Containers.Filesystem\EndToEnd.cs:line 71