{"id":17662325,"url":"https://github.com/docker/go-tuf-mirror","last_synced_at":"2025-04-15T03:05:24.285Z","repository":{"id":259226182,"uuid":"753629911","full_name":"docker/go-tuf-mirror","owner":"docker","description":"Mirror TUF metadata to/between OCI registries","archived":true,"fork":false,"pushed_at":"2024-11-25T08:40:30.000Z","size":297,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T03:05:19.251Z","etag":null,"topics":["github-actions","oci","the-update-framework","tuf"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/docker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-06T13:58:28.000Z","updated_at":"2025-02-12T14:42:02.000Z","dependencies_parsed_at":"2024-10-23T17:28:15.324Z","dependency_job_id":"d0dfcf36-aa08-42de-9868-429245ac84d9","html_url":"https://github.com/docker/go-tuf-mirror","commit_stats":{"total_commits":70,"total_committers":6,"mean_commits":"11.666666666666666","dds":"0.48571428571428577","last_synced_commit":"6cb12d389865b1c179abfe5156a0703f29a3063c"},"previous_names":["docker/go-tuf-mirror"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker%2Fgo-tuf-mirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker%2Fgo-tuf-mirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker%2Fgo-tuf-mirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker%2Fgo-tuf-mirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docker","download_url":"https://codeload.github.com/docker/go-tuf-mirror/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997085,"owners_count":21195799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","oci","the-update-framework","tuf"],"created_at":"2024-10-23T18:07:08.782Z","updated_at":"2025-04-15T03:05:24.267Z","avatar_url":"https://github.com/docker.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-tuf-mirror\n\nMirror TUF metadata to/between OCI registries\n\n\u003cdiv align=\"left\"\u003e\n\u003cimg src=\"https://github.com/docker/go-tuf-mirror/actions/workflows/test.yml/badge.svg\" alt=\"drawing\"/\u003e\n\u003c/div\u003e\n\n## Usage\n\n### GitHub Actions\n\nExample GHA workflow:\n\n```yaml\nname: Run go-tuf-mirror\non:\n  workflow_dispatch:\njobs:\n  mirror:\n    runs-on: ubuntu-latest\n    env:\n      DOCKER_CONFIG: ${{ github.workspace }}/.docker\n    steps:\n      - name: Login to Docker Hub\n        uses: docker/login-action@v3\n        with:\n          username: dockerpublicbot\n          password: ${{ secrets.DOCKERPUBLICBOT_WRITE_PAT }}\n      - name: Mirror metadata\n        uses: docker/go-tuf-mirror/actions/metadata@v0.1.0\n        with:\n          source: https://docker.github.io/tuf-staging/metadata\n          destination: docker://docker/tuf-metadata:latest\n      - name: Mirror targets\n        uses: docker/go-tuf-mirror/actions/targets@v0.1.0\n        with:\n          metadata: https://docker.github.io/tuf-staging/metadata\n          source: https://docker.github.io/tuf-staging/targets\n          destination: docker://docker/tuf-targets\n```\n\n### Mirror only metadata from web\n\n1. Build `go-tuf-mirror`\n   ```sh\n   make build\n   ```\n1. Run `metadata` command\n\n   ```sh\n   ./go-tuf-mirror metadata -s \u003cmetadata location\u003e -d \u003cmetadata output location\u003e\n   ```\n\n   example:\n\n   ```sh\n   # output metadata to docker registry\n   ./go-tuf-mirror metadata -s https://docker.github.io/tuf-staging/metadata -d docker://docker/tuf-metadata:latest\n\n   Mirroring TUF metadata https://docker.github.io/tuf-staging/metadata to docker://docker/tuf-metadata:latest\n   Metadata manifest pushed to docker/tuf-metadata:latest\n   ```\n\n#### Mirror delegated targets metadata\n\n1. Run `metadata` command with the `-f` flag\n\n   example:\n\n   ```sh\n   ./go-tuf-mirror metadata -f -s \"https://docker.github.io/tuf-staging/metadata\" -d \"docker://docker/tuf-metadata:latest\"\n\n   Mirroring TUF metadata https://docker.github.io/tuf-staging/metadata to docker://docker/tuf-metadata:latest\n   Metadata manifest pushed to docker/tuf-metadata:latest\n   Delegated metadata manifest pushed to docker/tuf-metadata:opkl\n   Delegated metadata manifest pushed to docker/tuf-metadata:doi\n   ```\n\n### Mirror only targets from web\n\n1. Build `go-tuf-mirror`\n   ```sh\n   make build\n   ```\n1. Run `metadata` command\n\n   ```sh\n   ./go-tuf-mirror targets -m \u003csource metadata location\u003e -s \u003csource targets location\u003e  -d \u003cdestination targets location\u003e\n   ```\n\n   example:\n\n   ```sh\n   # output targets to docker registry\n   ./go-tuf-mirror targets -m https://docker.github.io/tuf-staging/metadata -s https://docker.github.io/tuf-staging/targets  -d docker://docker/tuf-targets\n\n   Mirroring TUF targets https://docker.github.io/tuf-staging/targets to docker://docker/tuf-targets\n   Target manifest pushed to docker/tuf-targets:ecc736303caf8cf22ef00df2db3c411a563030c2e1e7ae24f4e38113e7ad610d.doi-signing-stage.pem\n   Target manifest pushed to docker/tuf-targets:3965bb0a873cff50e16b277444d659553ab79c9632a1fb03a6d9360af536c142.image-signer-verifier.pem\n   Target manifest pushed to docker/tuf-targets:e4dc114275694612ee236b231990d606b7879d05f64809611545c8234efb6cd4.doi-signing-key.pem\n   Target manifest pushed to docker/tuf-targets:5ddbaf12a091d0b877b7574af7cc19bf85023d649a520ccfebc0f2b5f8c2c4de.doi-signing-prod.pem\n   ```\n\n### Mirror metadata and targets from web\n\n1. Build `go-tuf-mirror`\n\n   ```sh\n   make build\n   ```\n\n1. Run `all` command\n\n   ```sh\n   ./go-tuf-mirror all --source-metadata \u003cmetadata location\u003e --source-targets \u003ctargets location\u003e --dest-metadata \u003cmetadata output location\u003e --dest-targets \u003ctargets output location\u003e\n   ```\n\n   example:\n\n   ```sh\n   # outputs metadata and targets to local OCI layout\n   ./go-tuf-mirror all --source-metadata \"https://docker.github.io/tuf-staging/metadata\" --source-targets \"https://docker.github.io/tuf-staging/targets\" --dest-targets \"oci://./tmp/targets\" --dest-metadata \"oci://./tmp/metadata\"\n\n   Mirroring TUF metadata https://docker.github.io/tuf-staging/metadata to oci://./tmp/metadata\n   Metadata manifest layout saved to ./tmp/metadata\n\n   Mirroring TUF targets https://docker.github.io/tuf-staging/targets to oci://./tmp/targets\n   Target manifest layout saved to tmp/targets/ecc736303caf8cf22ef00df2db3c411a563030c2e1e7ae24f4e38113e7ad610d.doi-signing-stage.pem\n   Target manifest layout saved to tmp/targets/3965bb0a873cff50e16b277444d659553ab79c9632a1fb03a6d9360af536c142.image-signer-verifier.pem\n   Target manifest layout saved to tmp/targets/e4dc114275694612ee236b231990d606b7879d05f64809611545c8234efb6cd4.doi-signing-key.pem\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocker%2Fgo-tuf-mirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocker%2Fgo-tuf-mirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocker%2Fgo-tuf-mirror/lists"}