I have encountered an interesting issue with a custom image created with dockerfile in windows. Dockerfile as follows;
FROM alpine
COPY ./exe /program/exe
COPY ./ConfigFile.txt /program/ConfigFile.txt
ENTRYPOINT /program/exe /program/ConfigFile.txt
Executable accepts a config file as its first parameter.
It is complaining that the executable is missing. But when I change the entrypoint to /bin/sh and list directory items, they are clearly there with appropriate execution rights.
The output is:
/program # ls -la
total 6356
drwxr-xr-x 1 root root 4096 Aug 4 15:42 .
drwxr-xr-x 1 root root 4096 Aug 4 15:39 ..
-rwxr-xr-x 1 root root 191 Jul 31 07:45 ConfigFile.txt
-rwxr-xr-x 1 root root 6490496 Jun 1 12:58 exe
/program # ./exe ./ConfigFile.txt
/bin/sh: ./exe: not found
I have tried changing the line ending in the dockerfile to LF or CRLF and neither of which have help
What am I missing?!
Edit: By the way, cat exe
works and spits the binary encoded text to console output, which also confirms it is right there!