Overriding entrypoint with new executable file fails in docker

Viewed 22

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?

0 Answers
Related