errata-ai / vale

:pencil: A markup-aware linter for prose built with speed and extensibility in mind.
https://vale.sh
MIT License
4.44k stars 153 forks source link

ARM64 Docker container contains an X64 Vale binary #859

Closed alecthegeek closed 6 days ago

alecthegeek commented 3 months ago

Check for existing issues

Environment

OS -- Linux running on ARM64 and Macos on M1 Arm

Docker image

Describe the bug / provide steps to reproduce it

The docker image for arm64 contains the X86 binary.

Vale cannot run in a container on Arm hardware

qemu-x86_64: Could not open '/lib/ld-musl-x86_64.so.1': No such file or directory
alecthegeek commented 2 months ago

Workaround:

Build your own custom image for linux/arm64. For example:

FROM golang:bookworm AS gobuild

WORKDIR /app/vale

RUN git clone https://github.com/errata-ai/vale.git  . \
 && CGO_ENABLED=1 go build -ldflags "-s -w -X main.version=$(git describe --abbrev=0 --tags)" -o /app/bin/vale ./cmd/vale

FROM debian:testing-slim

...
COPY --from=gobuild /app/bin/vale /usr/local/bin
...