cli
cli copied to clipboard
alpine fails with deepsource: cannot execute: required file not found
Running deepsource from https://github.com/DeepSourceCorp/cli/releases/download/v0.8.6/deepsource_0.8.6_linux_amd64.tar.gz on alpine:latest fails with
/usr/local/bin/deepsource: cannot execute: required file not found
https://github.com/taiki-e/install-action/actions/runs/9432055259/job/25981364422?pr=522
This isnt happening for any other platform tests in CI at https://github.com/taiki-e/install-action/pull/522
I also repeatedly get this issue on Alpine 3.22
/opt/atlassian/pipelines/agent/tmp/shellScript1769309726629188254.sh: line 8: ./deepsource: not found
I have tried manually downloading and extracting the archive and also passing it to sh as documented.
I am running this in Bitbuckets Pipelines, and this article implies that the binary may not be compatible:
https://community.atlassian.com/forums/Bitbucket-questions/Updating-PATH-while-running-a-bitbucket-pipeline/qaq-p/1970097
Hello,
Just to confirm, building the binary within the CI pipeline works as expected, so it does appear to be a compatibility issue with Alpine. Here's a rough script I'm using in our Bitbucket Pipelines in-case it helps anyone:
#!/usr/bin/env sh
apk add go make wget
mkdir deepsource-build && cd deepsource-build || exit 1
OUTPUT_DIR=`pwd`
wget https://github.com/DeepSourceCorp/cli/archive/refs/tags/v0.10.1.tar.gz
tar -xvf v0.10.1.tar.gz
cd cli-0.10.1/ || exit 1
cd cmd/deepsource && go build -tags static_all -o "$OUTPUT_DIR"
Very likely the binary is linked to glibc , and that lib is not installed on the base alpine image