0

I am trying to override the entrypoint of an image with a new executable as follows

Everything runs from github actions step FWIW

      - name: run docker
        run: |
          ls -l
          docker run \
          -v $GOOGLE_GHA_CREDS_PATH:/credentials.json \
          -v entrypoint-new:/usr/bin/entrypoint-new \
          --entrypoint /usr/bin/entrypoint-new \
          my-image:latest

The file is there of course (otherwise the mount would fail) and executable (this is the output of ls -l command that is invoked before docker run

-rw-r--r-- 1 runner docker 2577 Sep 21 16:57 README.md
-rwxr-xr-x 1 runner docker  100 Sep 21 16:57 entrypoint-new
-rw-r----- 1 runner docker 4056 Sep 21 16:57 gha-creds-12345.json

The process fails:

 exec: "/usr/bin/entrypoint-new": permission denied: unknown.

Why is that?

pkaramol
  • 16,451
  • 43
  • 149
  • 324
  • Do you want simply want to run a series of command when starting container https://stackoverflow.com/questions/73804200/%ce%95xecute-commands-with-args-and-override-entrypoint-on-docker-run/73804482#comment130321854_73804482? – Arkadiusz Drabczyk Sep 21 '22 at 18:20
  • Yes but for reasons beyond the scope of this question I cannot modify the entrypoint nor the cmd; – pkaramol Sep 21 '22 at 18:23
  • The main problem now why the `permission denied: unknown` – pkaramol Sep 21 '22 at 18:23

0 Answers0