Comments (8)
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
from bocker.
Should be fixed with the updated version here?
https://github.com/frohoff/bocker
from 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?
from bocker.
if the go
command is only use to detect the current OS, it could be replaced by uname
(or uname -s
).
from bocker.
@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]
from bocker.
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
from bocker.
@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?
from bocker.
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 😐
Can borrow from https://github.com/jjlin/docker-image-extract ?
from bocker.
Related Issues (15)
- Using 'shuf' for uuid generation results in occasional name conflicts. HOT 1
- Data mounts and port forwarding HOT 1
- bocker exec fails HOT 6
- bocker bash doesn't display a prompt HOT 8
- Question: why this MAC address prefix? HOT 1
- default $IFS is not `unset` HOT 1
- bocker exec fails #2 HOT 1
- Host isolation tested? HOT 1
- All 'containers' have the same IP HOT 3
- how do u define a container?
- How does this work? HOT 3
- is this the coolest thing ever? HOT 1
- rename to mocker :) HOT 1
- Should be called shocker hahaha `shell docker` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bocker.