I am trying to build the server example docker container. the binary gets successfully built and runs correctly on the machine. but when i run the docker image
this error shows
standard_init_linux.go:175: exec user process caused "no such file or directory"
my docker version is
Client:
Version: 1.12.1
API version: 1.24
Go version: go1.6.3
Git commit: 23cf638
Built: Thu Aug 18 05:22:43 2016
OS/Arch: linux/amd64
Server:
Version: 1.12.1
API version: 1.24
Go version: go1.6.3
Git commit: 23cf638
Built: Thu Aug 18 05:22:43 2016
OS/Arch: linux/amd64
How are you compiling the binary? It's like its not being statically linked. Also probably a good idea to use an alpine image rather than scratch. I've updated the Dockerfile.
# Build binary with the following command
# CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' -o server ./main.go
FROM alpine:3.2
ADD server /
ENTRYPOINT [ "/server" ]
Update: Maybe google the issue as well considering its a Docker issue rather than go-micro related. First link found just copy and pasting your error message https://forums.docker.com/t/standard-init-linux-go-175-exec-user-process-caused-no-such-file/20025/8
Most helpful comment
How are you compiling the binary? It's like its not being statically linked. Also probably a good idea to use an alpine image rather than scratch. I've updated the Dockerfile.
Update: Maybe google the issue as well considering its a Docker issue rather than go-micro related. First link found just copy and pasting your error message https://forums.docker.com/t/standard-init-linux-go-175-exec-user-process-caused-no-such-file/20025/8