Created
March 31, 2021 19:01
-
-
Save jdolitsky/2c85fe4d26ac32bb1bf09b58cf164a52 to your computer and use it in GitHub Desktop.
zot-oci-conformance.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
# | |
# zot-oci-conformance.sh | |
# | |
# Run OCI Distirbution Spec conformance tests (v1.0.0-rc2) | |
# against Zot registry server: https://github.com/anuvu/zot | |
# | |
# Start Zot server at localhost:5000 | |
TAG="1.1.13" | |
DIGEST="sha256:4e5d09b185bc7f12633f3b5e70bb23bf915e6896a1be242f37b3ac96b6d5ccf6" | |
docker rm -f registry || true | |
echo '{ | |
"http": {"address": "0.0.0.0", "port": 5000}, | |
"storage": {"gc": false, "dedupe": false, "rootDirectory": "/var/lib/registry"} | |
}' > ./zot.json | |
docker run -p 5000:5000 -d --restart always --name registry \ | |
-v "${PWD}/zot.json":/etc/zot/config.json \ | |
-v "${PWD}/registry":/var/lib/registry \ | |
"docker.io/atomixos/zot:${TAG}@${DIGEST}" | |
# Run distribution-spec conformance tests | |
TAG="v1.0.0-rc2" | |
DIGEST="sha256:2f0ced454ce31793cc69d48a05233ea76f2ebe791936d053342b66388a6de260" | |
docker run --net host --rm -w /out -v "${PWD}":/out \ | |
-e OCI_ROOT_URL="http://localhost:5000" \ | |
-e OCI_NAMESPACE="oci-test-1" \ | |
-e OCI_CROSSMOUNT_NAMESPACE="oci-test-2" \ | |
-e OCI_TEST_PULL=1 \ | |
-e OCI_TEST_PUSH=1 \ | |
-e OCI_TEST_CONTENT_DISCOVERY=1 \ | |
-e OCI_TEST_CONTENT_MANAGEMENT=1 \ | |
"ghcr.io/opencontainers/distribution-spec/conformance:${TAG}@${DIGEST}" | |
# Check out the HTML report | |
open ./report.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Download verify and run: