4

My Dockerfile looks like:

FROM ubuntu:18.04

RUN apt-get ...
...
COPY app /bin

And my executable app is just bash script:

make -f /app/makefile $@

When I try to run

docker run -v "`pwd`:/project" -it --rm my_image app

I get the following error:

standard_init_linux.go:207: exec user process caused "exec format error"
make: *** [run] Error 1

What should I do?

Nick Roz
  • 3,918
  • 2
  • 36
  • 57

1 Answers1

6

In case you entrypoint is bash script check whether it contains correct shebang, something like that:

#!/usr/bin/env bash
make -f /app/makefile $@

Either specify it in your entrypoint command, something like:

ENTRYPOINT ["sh", "/bin/app"]
Nick Roz
  • 3,918
  • 2
  • 36
  • 57