cli icon indicating copy to clipboard operation
cli copied to clipboard

[BUG] Fails to run on Alpine images

Open chriptus13 opened this issue 9 months ago • 4 comments

Describe the bug.

The CLI x86_64 tarball is dynamically linked against glibc and Alpine based images expects musl-compatible binaries.

Hence, when trying to create a Docker image based on alpine it fails to run with:

ld-linux-x86-64.so.2: /opt/asyncapi/bin/node: Not a valid dynamic program

When run ldd asyncapi:

/lib/ld-musl-x86_64.so.1: cannot load asyncapi: No such file or directory

Expected behavior

I would expect that I can run asyncapi cli on alpine distro.

Screenshots

Image

How to Reproduce

Dockerfile:

FROM alpine:3.21

RUN apk update

RUN apk --no-cache add bash

# Install asyncapi-cli
ENV ASYNCAPI_VERSION="v2.16.5"
RUN wget --quiet -c -O- https://github.com/asyncapi/cli/releases/download/$ASYNCAPI_VERSION/asyncapi.tar.gz | tar -xz -C /opt
RUN ln -s /opt/asyncapi/bin/asyncapi /usr/local/bin/asyncapi

Docker run commands

  1. docker build --platform linux/amd64 . -t img
  2. docker run img asyncapi

This also fails when installing glibc compatibility packages libc6-compat or gcompat.

🥦 Browser

None

👀 Have you checked for similar open issues?

  • [x] I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

None

chriptus13 avatar Feb 21 '25 22:02 chriptus13

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

github-actions[bot] avatar Feb 21 '25 22:02 github-actions[bot]

@AceTheCreator @chriptus13 Can I work on this Issue, I will start work once assigned. Estimated Time : One day

Rustix69 avatar Mar 05 '25 21:03 Rustix69

sure @Rustix69 go ahead give it a try

Souvikns avatar Apr 17 '25 18:04 Souvikns

@Rustix69 do you have any update on this?

Souvikns avatar May 31 '25 18:05 Souvikns

Please have a look the release is failing. https://github.com/asyncapi/cli/actions/runs/17151676406/job/48660192897

Shurtu-gal avatar Aug 22 '25 09:08 Shurtu-gal

Please have a look the release is failing. https://github.com/asyncapi/cli/actions/runs/17151676406/job/48660192897

because in that action the install dependencies were failing because of wrong lock file !

Gmin2 avatar Sep 10 '25 08:09 Gmin2

It is still failing: https://github.com/asyncapi/cli/actions/runs/17618055890/job/50056387323

Just had a fix here recently: https://github.com/asyncapi/cli/pull/1848

Shurtu-gal avatar Sep 10 '25 16:09 Shurtu-gal