Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM64 Docker container contains an X64 Vale binary #859

Open
1 task done
alecthegeek opened this issue Jul 2, 2024 · 1 comment
Open
1 task done

ARM64 Docker container contains an X64 Vale binary #859

alecthegeek opened this issue Jul 2, 2024 · 1 comment

Comments

@alecthegeek
Copy link

Check for existing issues

  • Completed

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
Copy link
Author

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
...

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

No branches or pull requests

2 participants