p8952 / bocker

Docker implemented in around 100 lines of bash
https://www.p8952.info/
GNU General Public License v3.0
11.26k stars 715 forks source link

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

Open zoobab opened 7 years ago

zoobab commented 7 years ago

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...

pwFoo commented 5 years ago

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

pwFoo commented 5 years ago

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?

tst2005 commented 5 years ago

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

pwFoo commented 5 years ago

@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]

tst2005 commented 5 years ago

IMHO,

axgkl commented 5 years ago

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

pwFoo commented 5 years ago

@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?

NoseyNick commented 3 years ago

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 ?