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

Binary for alpine linux #62

Open
Breee opened this issue Jan 19, 2024 · 1 comment
Open

Binary for alpine linux #62

Breee opened this issue Jan 19, 2024 · 1 comment

Comments

@Breee
Copy link

Breee commented Jan 19, 2024

The binary does not seem to work on alpine:

$ docker run -it --rm alpine sh

Then in the container:

$ wget https://rolesanywhere.amazonaws.com/releases/1.1.1/X86_64/Linux/aws_signing_helper
$ chmod +x aws_signing_helper
$ ./aws_signing_helper
sh: ./aws_signing_helper: not found

The reason is thatr it's linked against libc

$ ldd /usr/local/bin/aws_signing_helper 
        linux-vdso.so.1 (0x00007ffd331ad000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8076a03000)
        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f80769ef000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f80769ea000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f80757d8000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f8076a12000)

For my purposes i did a build in a container:

# Build credential helper for alpine
FROM golang:1.21-alpine
RUN apk add --no-cache git make gcc musl-dev
RUN git clone https://github.com/aws/rolesanywhere-credential-helper.git
RUN cd rolesanywhere-credential-helper && make release
RUN cp rolesanywhere-credential-helper/build/bin/aws_signing_helper /usr/bin/aws_signing_helper

FROM grafana/loki:2.9.3
USER root
COPY --from=0 /usr/bin/aws_signing_helper /usr/bin/aws_signing_helper

which then links against musl

ldd /usr/bin/aws_signing_helper
#11 0.280       /lib/ld-musl-x86_64.so.1 (0x7fe4f0c2f000)
#11 0.280       libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7fe4f0c2f000)

but would be cooler to download the binary directly from aws

@anth0d
Copy link

anth0d commented Feb 13, 2024

👋 Are you able to retry this with 1.0.4? I believe it was working previously in alpine.

Edit: oh, it seems to be a change in alpine actually

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

No branches or pull requests

2 participants