1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

12 commits

Author SHA1 Message Date
Dennis Chen
0af5db511e Download support of images with multi-arch manifest
Currently we only support 'application/vnd.docker.distribution.manifest.v2+json'
manifest images download, with more multi-arch images used, we need to support
download images with 'application/vnd.docker.distribution.manifest.list.v2+json'
format(aka "fat manifest"), else we will fail to download those multi-arch ones.

This PR adds 'application/vnd.docker.distribution.manifest.list.v2+json' manifest
support, thus we can download both multi-arch and legacy images.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-12-14 05:37:22 +00:00
Jacob Wen
238d17c456 Handle https proxy's CONNECT response
When using a https proxy, an extra HTTP 200 header will be generated.
So we can't rely on detecting the first http header.

$curlHeaders with https proxy:
"HTTP/1.0 200 Connection established  <-- the https proxy's response

HTTP/1.1 307 Temporary Redirect
...
"

See https://stackoverflow.com/a/34537988/889429

Fixes #34131

Signed-off-by: Jacob Wen <jian.w.wen@oracle.com>
2017-07-21 10:13:04 +08:00
Tianon Gravi
4bbdc0b8f7 Update "download-frozen-image-v2.sh" such that redirects are optional
If the registry responds directly with blob contents, use them,
otherwise follow the redirect without Authorization headers (which
likely aren't valid for the server being redirected to).

This preserves the basic structure of the previous output with up to one
additional progress bar per-layer (for the redirect request and then the
following blob request).

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2017-06-22 15:54:50 -07:00
Alexander Midlash
5c38e4c16a Update downloader script, to ensure that Authorization header is not passed when downloading blobs.
Signed-off-by: Alexander Midlash <amidlash@docker.com>
2017-06-22 15:54:50 -07:00
vanderliang
cb502cd4e8 Fix downloading image fails when build docker
Generate a token for each download process to avoid token expired.

Closes: #33441

Signed-off-by: vanderliang <lansheng@meili-inc.com>
2017-05-31 14:21:32 +08:00
Tianon Gravi
52379fa76d Convert script shebangs from "#!/bin/bash" to "#!/usr/bin/env bash"
This is especially important for distributions like NixOS where `/bin/bash` doesn't exist, or for MacOS users who've installed a newer version of Bash than the one that comes with their OS.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2017-02-13 11:01:54 -08:00
Tianon Gravi
356dc712a6 Update "download-frozen-image-v2.sh" for schemaVersion 2
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2017-01-26 11:08:28 -08:00
Antonio Murdaca
887bc48319
contrib: download-frozen-image-v2.sh requires jq
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-12-01 12:40:58 +01:00
Shijiang Wei
05b05a358f request a new token before downloading each layer
Fixes #20069

Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2016-02-14 16:56:07 +08:00
Justas Brazauskas
927b334ebf Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
2015-12-13 18:04:12 +02:00
John Howard
c07e79fa8a Windows CI Fix: Allow bash v4
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-12-06 14:40:29 -08:00
Jessica Frazelle
359d0c247f
update download-frozen-image.sh to v2 registry
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-12-01 13:16:42 -08:00