This project exposes containers-storage
(as used by podman) via the standard OCI distribution spec (also known as a container registry).
The registry is read-only and provides a way to serve local container images over HTTP.
- Enable local virtual machines to fetch content directly from the host's container storage
- Particularly useful with bootc for local development workflows (see below)
While this project can run outside of a container, it currently requires a patched version of skopeo. Therefore, running it as a container is recommended.
A pre-built container image is available for x86_64; see below.
You must bind mount your host's container storage into /var/lib/containers/storage
in the container:
- For rootless podman:
~/.local/share/containers/storage
- For rootful podman:
/var/lib/containers/storage
The container requires --privileged
mode for two reasons:
- Write access to storage for locking (this requirement will be removed in a future update)
- SELinux labeling support
The service listens on port 8000 by default. You can map this to any desired host port.
Start the registry proxy:
podman run --name regproxy --privileged --rm -d \
-p 8000:8000 \
-v ~/.local/share/containers/storage/:/var/lib/containers/storage \
ghcr.io/cgwalters/cstor-dist:latest
Important: By default, the server does not use TLS. When using tools like skopeo
, you must specify --src-tls-verify=false
.
Example of copying an image:
skopeo copy --src-tls-verify=false \
docker://127.0.0.1:8000/quay.io/fedora/fedora:latest \
oci:/tmp/foo.oci
- Clone the repository:
git clone https://github.com/cgwalters/cstor-dist.git
cd cstor-dist
- Build using podman or docker:
podman build -t cstor-dist .
While containers are typically run on the same machine where they're built when using podman/docker, bootc is commonly used in a distributed setup where you build on one machine and test on another.
This project works particularly well with Anaconda on Linux host systems. You'll just
need to point your ostreecontainer
at the cstor-dist endpoint.
This enables a quicker iteration workflow:
- Build containers in your regular unprivileged podman storage
- Use
bootc upgrade
to efficiently deploy changes without data transfer overhead