mirror of
https://github.com/docker/cli.git
synced 2026-01-13 18:22:35 +03:00
Adds capabilities to import a .zip file with importZip. Detects the content type of source by checking bytes & DetectContentType. Adds LimitedReader reader, a fork of io.LimitedReader, was needed for better error messaging instead of just getting back EOF. We are using limited reader to avoid very big files causing memory issues. Adds a new file size limit for context imports, this limit is used for the main file for .zip & .tar and individual compressed files for .zip. Added TestImportZip that will check the import content type Then will assert no err on Importing .zip file Signed-off-by: Goksu Toprak <goksu.toprak@docker.com>