Skip to content

Add docker.stackable.tech & quay & documentation #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,27 @@ These images should now appear in the Zot Web UI.
- `registry-logs.sh`: View (tail) registry logs
- `registry-cleanup.sh`: Clean up registry data (including the volume with the mirrored images)

## TODO
## Push local images

Document how to push images.
Using `docker push` returns `manifest invalid` because Zot does not support docker manifests.
See: https://github.com/project-zot/zot/issues/2234
zot only supports OCI manifests and they are incompatible with what a `docker build` produces by default.

You'll need to use a tool like [skopeo](https://github.com/containers/skopeo) to copy the images to zot.

This will copy an image from your local docker daemon to the zot registry
```
skopeo --insecure-policy copy --dest-tls-verify=false --format=oci docker-daemon:oci.stackable.tech/sdp/nifi:2.4.0-stackable0.0.0-dev docker://localhost:5000/sdp/nifi:2.4.0-stackable0.0.0-dev
```

You can then reference those images using the `host.k3d.internal` URL:

```
host.k3d.internal:5000/sdp/nifi:2.4.0-stackable0.0.0-dev
```

## Help

### Pods don't come up

If none of the pods come up (eg: coredns), it is likely that the firewall is
preventing taffic from the k3s node to the docker network (so the kubelet cannot
pull via the mirror).
Expand All @@ -83,3 +96,9 @@ starting point (the IP comes from the error above):
```shell
sudo iptables -I INPUT -p tcp -d 172.21.0.1 --dport 5000 -j ACCEPT
```

### ImagePullBackOff

One reason for this could be that you hibernated or restarted your computer.
Sometimes the internal DNS resolution in k3d doesn't work afterwards and can't find the registry anymore.
In that case the only solution I found so far is to create a new cluster but there _might_ be other ways.
19 changes: 14 additions & 5 deletions config/zot-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,31 @@ extensions:
registries:
- urls: ["https://docker.io"]
onDemand: true
maxRetries: 3
retryDelay: "5m"
maxRetries: 10
retryDelay: "30s"
tlsVerify: true
content:
- prefix: "**"
destination: "/mirror/docker-io"

- urls: ["https://oci.stackable.tech"]
- urls: ["https://oci.stackable.tech", "https://docker.stackable.tech"]
onDemand: true
maxRetries: 3
retryDelay: "5m"
maxRetries: 10
retryDelay: "30s"
tlsVerify: true
content:
- prefix: "**"
destination: "/mirror/stackable"

- urls: ["https://quay.io"]
onDemand: true
maxRetries: 10
retryDelay: "30s"
tlsVerify: true
content:
- prefix: "**"
destination: "/mirror/quay"

search:
enable: true
"cve":
Expand Down
10 changes: 10 additions & 0 deletions k3d-registries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ mirrors:
"oci.stackable.tech":
endpoint:
- "http://host.k3d.internal:5000/v2/mirror/stackable"
"docker.stackable.tech":
endpoint:
- "http://host.k3d.internal:5000/v2/mirror/stackable"
"quay.io":
endpoint:
- "http://host.k3d.internal:5000/v2/mirror/quay"

"host.k3d.internal:5000":
endpoint:
- "http://host.k3d.internal:5000"
configs:
"host.k3d.internal:5000":
tls:
Expand Down