Skip to main content

Husk

A tool for building ~10x smaller, self-hostable, read-only container registries.

Usage

Use Husk to extract a list of images from your local machine:

$ sudo uvx --from husk-cli husk extract 'your-domain.com/*'

This creates a dist folder with the following files:

$ tree dist
dist
├── app
│   ├── blobs
│   │   └── <list of blobs here>
│   └── manifests
│       └── <image names>
│           └── <image versions>
├── docker-compose.yml
└── nginx.conf

Copy (or rsync) the dist folder to your server and spin-up the NGINX server:

$ cd dist
$ docker compose up -d

That's it! Now you can pull images from your self-hosted container registry:

$ docker run --rm -it your-domain.com/your-image-here

Manual Install

Instead of running Husk as a UV tool, you can download and run it manually.

Install via uv

$ uv add husk-cli --dev
$ sudo uv run husk extract 'your-domain.com/*'

Install via pip

$ pip install husk-cli
$ sudo husk extract 'your-domain.com/*'

Why?

Husk offers many benefits over the standard Docker Registry:

  • Husk is read-only, giving you secure anonymous access out of the box
  • Husk only stores blobs you built locally: blobs available on Docker Hub are deferred to Docker Hub (we call this "blob sharding")

    Note: You need to use the --use-remote-blobs flag to enable this feature.

  • Husk uses NGINX for fast static file hosting/caching
  • Husk supports infinite namespaces for images. For example: your-domain.com/service/saas-product/backend/api:v1

In contrast, Husk is probably not for you if:

  • You frequently need to docker push new images
  • You don't care about the size of your container registry
  • You don't want anonymous access

Target Audience

Husk is primarily meant for FOSS companies and orgs that want to host their images on their own domains.

Husk can extract any built image, but it really starts to shine when extracting wrapper images, Alpine-based images, and other size-optimized images.

Planned Features

  • Add flag to disable blob sharding (removes dependency on Docker Hub)
  • Package manager aware blob sharding (requires build-time support or other black magic)
  • Optional NGINX-based authorization:
    • Instance wide access
    • Namespace wide access
    • Per-image access
  • More spec compliant error messages
  • Add optional support for the Docker Registry v2 /catalog endpoint
  • deploy or sync command for rsyncing dist folder to a remote server

Release files for husk-cli 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for husk-cli 0.2.0
File Size Uploaded
husk_cli-0.2.0.tar.gz 10.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for husk-cli 0.2.0
File Interpreter ABI Platform
husk_cli-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.3 kB

Release files / husk_cli-0.2.0.tar.gz

Download URL husk_cli-0.2.0.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c43051a87d064cdc1c3159b4836b24eff5c50f0f7c21037eca320a415cfd31b7
BLAKE2b-256 checksum
How to use checksums
eb38d577d8caf667278be6bfc57e70dcd55ec52e5847725020d654fd4ef4929f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / husk_cli-0.2.0-py3-none-any.whl

Download URL husk_cli-0.2.0-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4a79e4f86121c9438deebd7ac97fa032aea20e3a5841852dea660bb0ec4b31f
BLAKE2b-256 checksum
How to use checksums
64077143e6a96923570cfbcead21cc9b54adf07e950f53c42162374b1031dff7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page