Image Overview: zot

Overview: zot Chainguard Image

Minimal image with zot binary.

Download this Image

The image is available on cgr.dev:

docker pull cgr.dev/chainguard/zot:latest

Usage

Create a zot config file:

cat <<EOF > zot-config.yaml
distspecversion: 1.1.0-dev
http:
  address: 0.0.0.0
  port: 5000
storage:
  rootdirectory: /var/lib/zot/data
EOF

Create a fresh data directory (this will store all OCI blobs as OCI Image Layout):

rm -rf data && mkdir data && chmod go+wrx data

Run the server:

docker run --rm -p 5000:5000 \
  -v "${PWD}/zot-config.yaml":/zot-config.yaml \
  -v "${PWD}/data":/var/lib/zot/data \
  cgr.dev/chainguard/zot:latest \
  serve /zot-config.yaml

Then in another terminal, try pushing an image with crane:

crane cp \
  cgr.dev/chainguard/bash:latest \
  localhost:5000/demo:latest

Then try pulling and running the image:

docker run --rm \
  localhost:5000/demo:latest \
  -c 'echo hello world'

Last updated: 2024-04-11 12:38