Segmentation fault golang alpine
chrisdlangton opened this issue · comments
using this simple Dockerfile;
FROM golang:alpine
RUN apk add git && \
wget -q -O - https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
Assuming docker build -t <tag> .
and docker run -it --entrypoint=/bin/sh <tag>
Running dep init
produces Segmentation fault
. and which dep
produces /go/bin/dep
as expected.
Is alpine not yet supported?
alpine uses musl libc versus glibc, so you will need to use the alpine packaged version of dep - the dep binary releases link to glibc. if you include the alpine community repository this should be available, just apk add dep. Alternatively, you can amend the Dockerfile to build dep from source.
as a followup, this works for me:
FROM golang:alpine
RUN apk add git && apk add dep
406812a41c0e:~# dep version
dep:
version : 0.5.0
build date :
git hash :
go version : go1.12.5
go compiler : gc
platform : linux/amd64
features : ImportDuringSolve=false
406812a41c0e:~#
Verified working 👍
Suggest an alpine support section of the docos to describe this, i went looking and had to report it here, of course only needed if there's no intention to support alpine via install.sh
going forward