stoplightio / spectral

A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI (v3.1, v3.0, and v2.0), Arazzo v1.0, as well as AsyncAPI v2.x.
https://stoplight.io/spectral
Apache License 2.0
2.55k stars 240 forks source link

Docker image: add support for arm64 #2746

Open Martin-happy opened 5 days ago

Martin-happy commented 5 days ago

Chore summary AFAI can see there is no docker-image available for linux/amd64. Running spectral lint in our cicd pipeline (in docker) hits a blocker when the job runs in an arm64 arch node.

Tasks

Additional context docker multi arch build: https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/ current available tags on dockerhub: https://hub.docker.com/r/stoplight/spectral/tags

Docker trying to auto-match an image for the host platform on an linux/arm64/v8 machine:

Status: Downloaded newer image for stoplight/spectral:latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /usr/local/bin/spectral: exec format error
Martin-happy commented 5 days ago

I think this could be a fast win as the arm64 build in general is already set up https://github.com/stoplightio/spectral/pull/2569