Skip to content

Binary not found after installation on Alpine linux #71

@afoltzm

Description

@afoltzm

Hi there! Thanks for putting together this great library, and for making it available to Babashka users as a pod. I'm trying to get it set up in Docker for some lightweight documentation tasks, but I'm coming across a strange issue where I can't find the binary on Alpine linux after installing it.

Here's a Dockerfile that reproduces the issue:

FROM alpine:3.12.0

ARG BB_VER=0.1.3
ARG BOOTLEG_VER=0.1.9

RUN apk add --no-cache wget unzip tar
RUN mkdir -p /usr/local/bin
RUN echo "Installing babashka"
RUN wget https://github.com/borkdude/babashka/releases/download/v$BB_VER/babashka-$BB_VER-linux-static-amd64.zip
RUN unzip babashka-$BB_VER-linux-static-amd64.zip -d /usr/local/bin/
#RUN bb -e '(print "babashka installed successfully.")'

RUN echo "Installing bootleg"
RUN wget https://github.com/retrogradeorbit/bootleg/releases/download/v$BOOTLEG_VER/bootleg-$BOOTLEG_VER-linux-amd64.tgz
RUN tar xvf bootleg-$BOOTLEG_VER-linux-amd64.tgz && \
    mv bootleg /usr/local/bin && \
    chown 0:0 root /usr/local/bin/bootleg && \
    chmod +x /usr/local/bin/bootleg

RUN ls -la /usr/local/bin/
RUN /usr/local/bin/bb --version
RUN /usr/local/bin/bootleg --version

ENTRYPOINT ["bb"]

The output of the ls -la /usr/local/bin step shows the following:

total 117636
drwxr-xr-x    1 root     root          4096 Aug 24 23:30 .
drwxr-xr-x    1 root     root          4096 May 29 14:20 ..
-rwxr-xr-x    1 root     root      65626272 Jun 27 11:38 bb
-rwxrwxr-x    1 root     root      54815784 May 27 14:13 bootleg

so it's clearly there and it's marked as executable, but attempting to execute it fails further down in the Dockerfile.

/bin/sh: /usr/local/bin/bootleg: not found
The command '/bin/sh -c /usr/local/bin/bootleg --version' returned a non-zero code: 127

Is this because there's a runtime dependency for bootleg or GraalVM that the Alpine base image lacks? babashka's static binary appears to work just fine without any additional dependencies.

Happy to provide any additional information if need be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions