Skip to content

Docker image on GHCR (ghcr.io/datagriff/apic) #59

Closed

Description

@dataGriff

Why

CI systems that are not GitHub Actions (GitLab, Jenkins, Azure Pipelines) and locked-down runners install tools as images. A static binary makes a tiny scratch image, and the docs' CI recipes become one line.

What

  • dockers: and docker_manifests: in .goreleaser.yaml: FROM scratch (plus ca-certificates copied in, since apic makes TLS calls), amd64 and arm64, tags latest, vX.Y.Z, vX.Y, ENTRYPOINT ["/apic"], WORKDIR /work, OCI labels (source, licence, description).
  • release.yml: packages: write, docker/setup-qemu-action and docker/setup-buildx-action, login to GHCR with GITHUB_TOKEN.
  • The image is signed with cosign keyless like checksums.txt (cosign sign ghcr.io/datagriff/apic@sha256:…), and docs/verifying.md gets the verify command.
  • Docs: docker run --rm -v "$PWD/api:/work" ghcr.io/datagriff/apic run smoke.http --env staging --json --redact, with a note about APIC_VAR_* via -e and that apic ui needs -it.

Where

.goreleaser.yaml, .github/workflows/release.yml, a Dockerfile at the root, docs/getting-started.md, docs/cookbook.md (CI recipe variant), docs/verifying.md, README.md.

Tests

task snapshot builds the image locally (add --skip=publish); a CI smoke step runs docker run ghcr.io/datagriff/apic version after release.

Activity

  1. dataGriff commented on Sep 25, 2026

    @dataGriff
    OwnerAuthor

    Done in #117 (commit b8b15b3), merged as f871db1.

    • Image: ghcr.io/datagriff/apic, built by goreleaser's dockers_v2 for amd64 and arm64. It's the binary on scratch, with Alpine's CA bundle and a /tmp laid out on the build platform, so no QEMU is needed. It's signed keylessly, and buildx attaches an SBOM.
    • Tags: the version, v plus the version, vX.Y and latest.
    • Release smoke test: release.yml runs docker run … version against the pushed tag.
    • CI: builds and runs the image on every PR.
    • Differences from the issue:
      • no QEMU step, since the Alpine stage runs on the build platform;
      • the docs cover the one limit of scratch: a CI job image that has to run a shell script, such as GitLab's image:, needs COPY --from=ghcr.io/datagriff/apic /apic … into your own image, or install.sh.

    The first push and signature happen on the next release tag.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions