What the docker image should run:
-bash-4.2$ pwd
/u/workspaces/compose/src
-bash-4.2$ ls
compileAndTest
-bash-4.2$ vim compileAndTest
#!/usr/bin/env bash
echo 'hi'
Dockerfile
-bash-4.2$ pwd
/u/mybuild
-bash-4.2$ ls
Dockerfile
-bash-4.2$ vim Dockerfile
FROM java
WORKDIR /u/workspaces/compose
CMD /src/compileAndTest
build and run
-bash-4.2$ docker build -t myjavabuild .
Sending build context to Docker daemon 3.072 kB
Step 1 : FROM java
---> 69a777edb6dc
Step 2 : WORKDIR /u/eugenep/workspaces/compose
---> Using cache
---> 583d8616f495
Step 3 : CMD /src/compileAndTest
---> Using cache
---> d0458943d19e
Successfully built d0458943d19e
-bash-4.2$ docker run myjavabuild
/bin/sh: 1: /src/compileAndTest: not found
even though the path to the executable compileAndTest is specified in Dockerfile, it says not found
anyone know why?