I have been working a lot with Docker and Go lately and I come across a very annoying error when running tools built in Go in containers on a RaspberryPi. All of the bug reports I found had something to do with Windows-style line endings (CRLF) but I am using MacOS, so this can’t be the solution (at least) for me here.
This is the Dockerfile I have been using:
FROM alpine WORKDIR /app ADD washing-machine /app/washing-machine CMD ["./washing-machine"]
FROM golang:1.9.3-alpine3.7 ADD . /app WORKDIR /app RUN cd /app && \ apk update && \ apk add git bash && \ go get github.com/domnikl/ifttt-webhook && \ go get github.com/domnikl/fritz-box && \ go build -o washing-machine CMD [ "/app/washing-machine" ]
Hope this will help you in getting around this annoying error message.