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

Does not run in Alpine Linux container #79

Open
mcaulifn opened this issue Feb 23, 2021 · 1 comment
Open

Does not run in Alpine Linux container #79

mcaulifn opened this issue Feb 23, 2021 · 1 comment

Comments

@mcaulifn
Copy link

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
Copy link

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

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