jjlin / docker-image-extract

Minimal-dependency shell script to pull and extract all files from an image in Docker Hub
MIT License
87 stars 17 forks source link

Support for images NOT on docker hub? #5

Open dlasher opened 7 months ago

dlasher commented 7 months ago

Trying to extract an image hosted somewhere other than docker hub, and getting:

root@frigate:~# ./docker-image-extract ghcr.io/blakeblackshear/frigate:stable
Getting multi-arch manifest list...
No image digest found. Verify that the image, ref, and platform are valid.

root@frigate:~# ./docker-image-extract ghcr.io/blakeblackshear/frigate:stable-amd64
Getting multi-arch manifest list...
No image digest found. Verify that the image, ref, and platform are valid.

I suspect this is our problem:

# https://docs.docker.com/docker-hub/api/latest/#tag/repositories
manifest_list_url="https://hub.docker.com/v2/repositories/${image}/tags/${ref}"

Would be great to be able to target an image somewhere other than docker hub.

creshal commented 6 months ago

Yeah, it would be helpful if that was configurable. We would like to use our Gitlab Dependency Proxy to cache images.

jjlin commented 5 months ago

I can probably make some changes for GHCR support at least, but out of curiosity, what are you guys using this script for? I mainly wrote this script for use cases where installing Docker wasn't feasible, but if it is, the real tools are going to be more robust.

creshal commented 5 months ago

The "real" tools are mostly more bloated. :) We need it for vaultwarden, which recommends using docker-image-extract for when running docker isn't feasible. It's a ridiculous workflow and I'd prefer for vaultwarden to just provide binaries directly, but until that happens, docker-image-extract is faster and easier to implement than adding another containerization layer to our CI.

dlasher commented 5 months ago

I wanted to unpack Frigate, so I could build it into an LXC container. It used to be on docker hub (https://hub.docker.com/r/blakeblackshear/frigate) but then moved to https://ghcr.io/blakeblackshear/frigate:stable