Does not run in Alpine Linux container
mcaulifn opened this issue · 1 comments
mcaulifn commented
I am attempting to use tgswitch in an Alpine based image (Atlantis) and getting not found
. I was able to replicate with a base apline container:
FROM alpine
ARG TERRAGRUNT_VERSION="0.26.7"
RUN apk add curl bash
RUN curl -L https://raw.githubusercontent.com/warrensbox/tgswitch/release/install.sh | bash && \
tgswitch ${TERRAGRUNT_VERSION}
This returns the following:
Step 4/4 : RUN curl -L https://raw.githubusercontent.com/warrensbox/tgswitch/release/install.sh | bash && tgswitch ${TERRAGRUNT_VERSION}
---> Running in 33603e3002f1
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9129 100 9129 0 0 11105 0 --:--:-- --:--:-- --:--:-- 11092
warrensbox/tgswitch info checking GitHub for latest tag
warrensbox/tgswitch info found version: 0.4.326 for 0.4.326/linux/amd64
warrensbox/tgswitch info installed /usr/local/bin/tgswitch
/bin/sh: tgswitch: not found
The command '/bin/sh -c curl -L https://raw.githubusercontent.com/warrensbox/tgswitch/release/install.sh | bash && tgswitch ${TERRAGRUNT_VERSION}' returned a non-zero code: 127
I was able to run the same commands in a Ubuntu container and there are no issues.
henworth commented
I ran into this same problem. What fixed it for me was adding this to my Dockerfile
:
RUN apk add --no-cache libc6-compat
More background here: https://stackoverflow.com/questions/36279253/go-compiled-binary-wont-run-in-an-alpine-docker-container-on-ubuntu-host