bocker
bocker copied to clipboard
bocker pull does not support public registry, can't pull from there anymore
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...
Should be fixed with the updated version here? https://github.com/frohoff/bocker
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?
if the go command is only use to detect the current OS, it could be replaced by uname (or uname -s).
@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]
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
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 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?
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 ?