I am new to container world and exploring options to run my application on a container.Here are the things that I am seeing
1.When I include compiling and building the C/C++ binary as part of docker image itself, it works fine with out any problems. Container starts and everything works fine.
2. If I try to run an already compiled and existing binary using CMD ["./helloworld"] in a container It throws me this error
standard_init_linux.go:185: exec user process caused “exec format error”.
Any ideas of how to get out of this problem? This seems like a basic problem that would have been solved already
Here is my dockerfile:
COPY . /Users/test//Documents/CPP-Projects/HelloWorld-Static
Hers is my exe
gobjdump -a build/exe/hellostatic/hellostatic
build/exe/hellostatic/hellostatic: file format mach-o-x86-64
Here is the error:
docker run test
standard_init_linux.go:185: exec user process caused “exec format error”