bocker icon indicating copy to clipboard operation
bocker copied to clipboard

bocker pull does not support public registry, can't pull from there anymore

Open zoobab opened this issue 8 years ago • 8 comments

bocker pull does not support public registry, can't pull from there anymore.

The api has switched to v2, and the v1 does not seem to work anymore...

zoobab avatar Jan 13 '17 15:01 zoobab

Should be fixed with the updated version here? https://github.com/frohoff/bocker

pwFoo avatar Mar 07 '19 12:03 pwFoo

But the bocker version with fixed pull from @frohoff has more dependencies! https://github.com/frohoff/bocker/blob/master/bocker#L25

And download-frozen-image-v2 needs curl, go and jq... https://github.com/moby/moby/blob/master/contrib/download-frozen-image-v2.sh#L11

Is there a way to download and extract docker images without so much dependencies?

pwFoo avatar Mar 07 '19 12:03 pwFoo

if the go command is only use to detect the current OS, it could be replaced by uname (or uname -s).

tst2005 avatar Mar 08 '19 10:03 tst2005

@tst2005 Good point! OS and ARCH

curl would be ok.

What's about jq (3,77MB binary linux64)

[EDIT] Is there a simple bash script to download a docker image from a shell without dependencies? Searched for a simple way to download an image... [/EDIT]

pwFoo avatar Mar 08 '19 10:03 pwFoo

IMHO,

  • s/without dependencies/with a few dependencies/
  • jq is a very powerfull utility to process json data. It is hard to deal with json without it. I don't know alternative or pure bash implementation

tst2005 avatar Mar 08 '19 11:03 tst2005

This downloads from v2, based on the moby one but w/o go (hardcoded amd64) and jq (this was hard) deps.

  • New dependency: python (2 or 3)
  • Tested only for a few images with v2 schemas.
  • Fragile hack - but the original is as well https://gist.github.com/AXGKl/9acf71366348e0ab0b85dd9258374792

axgkl avatar Mar 18 '19 02:03 axgkl

@AXGKl You should add python in dependency check? https://gist.github.com/AXGKl/9acf71366348e0ab0b85dd9258374792#file-docker_image_downloader-sh-L13

Python should be pre-installed with centos, but needs to be installed with other os variants?

pwFoo avatar Mar 18 '19 16:03 pwFoo

I was about to suggest...

awk -F ': *' '$1 == "X-Docker-Token" { print $2 }'

needs to be case-insensitive:

awk -F ': *' 'tolower($1) == "x-docker-token" { print $2 }'

... but yeah nah, this goes deeper, needs the v2 API :neutral_face:

Can borrow from https://github.com/jjlin/docker-image-extract ?

NoseyNick avatar Aug 28 '21 01:08 NoseyNick