Docker does not find executable

695 views Asked by At

I have an executable written in Golang, it starts and runs fine when started from the Linux-prompt. As you can see, the executable needs an XML file when started. But when started inside a Docker environment, I get error message:

standard_init_linux.go:190: exec user process caused "no such file or directory"

Let me tell you what I tried. First, this is my Dockerfile:

FROM alpine:latest
MAINTAINER Bert Verhees "xxxxx"
ADD archibold_ucum_service /archibold_ucum_service
ADD data/ucum-essence.xml /data/ucum-essence.xml
ENTRYPOINT ["/archibold_ucum_service", "-ucumfile=/data/ucum-essence.xml"]

I build it in this way:

docker build -t=ucum_micro_service .

Then I start it in this way

docker run --name=ucum_micro_service -i -t ucum_micro_service /bin/sh

When I do this, I get the error-message, as displayed above. Then I tried commenting out the ENTRYPOINT line, and then it builds OKAY and it starts the linux prompt, so I can query what is inside. The executable is in it, and the data-file also. And the executable also has the right attributes (it is executable inside the docker-container)

Then I try to start the executable from the linux-prompt, inside the started container, and then I get again a message that the file is not found:

/ # ./archibold_ucum_service
/bin/sh: ./archibold_ucum_service: not found

For completeness, here is partly the directory-structure in the container:

/ # ls -l
total 17484
-rwxrwxr-x    1 root     root      17845706 Aug  3 13:21 archibold_ucum_service
drwxr-xr-x    2 root     root          4096 Jul  5 14:47 bin
drwxr-xr-x    2 root     root          4096 Aug  3 14:29 data
drwxr-xr-x    5 root     root           360 Aug  4 20:27 dev
drwxr-xr-x   15 root     root          4096 Aug  4 20:27 etc
drwxr-xr-x    2 root     root          4096 Jul  5 14:47 home
drwxr-xr-x    5 root     root    ........
.......

So, what can be the problem. I am trying to solve this for over a day now. Thanks for support.

0

There are 0 answers