I am trying to run an alpine based container which will run a hello world C++ program on starting. However, I'm getting a
standard_init_linux.go:207: exec user process caused "no such file or directory"
error on running the container.
I did an ls -al
into the container to check if the file exists with the correct permissions. The executable(named test
) exists in the root directory with -rwxrwxr-x
permissions.
This is my Dockerfile.
FROM alpine:latest
ADD test /
ENTRYPOINT ["/test"]
Can someone help me in identifying what the issue is? Thanks !
Edit : I compiled my .cpp file on Ubuntu 18.04 to generate the executable.
g++ -o test test.cpp
test.cpp :
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World"<<endl;
return 0;
}