I am trying to generate a docker image based on a binary of Go. I have the next Dockerfile:
FROM alpine
WORKDIR /
# Now just add the binary
RUN apk add --update bash && rm -rf /var/cache/apk/*
ADD mybinary /
ADD config /config
ADD data /data
ENTRYPOINT ["./mybinary"]
And I built the binary by doing:
env GOOS=linux GOARCH=386 CGO_ENABLED=1 go build -o mybinary
The binary works pretty good if I executed alone, and the docker image is created as well, but in the moment of execution then I get the error:
standard_init_linux.go:185: exec user process caused "no such file or directory"
I read in many post that it's something regarding git, so, I deleted and cloned the project again but still I get the same error