The container-image package provides a straightforward OCaml
interface for interacting with OCI and Docker image specifications. It
also provide a CLI tool (named `container-image) that allows users to
fetch image layers or inspect image contents on your filesystem.
- An OCaml API to manage OCI and Docker images
- Fetch layers of an OCI or Docker image.
- Inspect the contents of an image on the local filesystem, complete with a git history for easy diff inspection between layers.
git clone https://github.com/your-repo/container-image.git
cd container-image
opam install . --deps-only
dune build @installopam install container-imageTo fetch the layers of an image:
container-image fetch IMAGE_NAME[:TAG]This command downloads the image layers to the current directory. By
default TAG is latest.
To inspect an image's contents on the local filesystem:
container-image checkout [TAG]After running this command, you'll find the image's contents extracted to the current directory. Importantly, this checkout will include a git history, allowing you to seamlessly inspect the differences between layers.
For an in-depth guide on the container-image commands and the
underlying OCaml API, check out the official
documentation.
Contributions to the container-image project are welcome!
This project is licensed under the MIT License. See LICENSE for more details.