Docker DIND deploy fails because docker image doesn't contain bash

https://docs.gitlab.com/ce/ci/docker/using_docker_build.html

I’ve installed a DIND runner as described in this document, but the DIND container fails to run the deploy script, as the docker image doesn’t contain bash.

So the following .gitlab-ci.yaml snippet:

deploy:
  stage: deploy
  script:
    - ./deploy.sh
  only:
    - master

Fails at the deploy stage, with this error:

/bin/sh: $ bash ./deploy.sh
eval: line 77: bash: not found
ERROR: Job failed: exit code 127

Found that it will run with sh, as follows:

deploy:
stage: deploy
script:
- chmod +x ./deploy.sh
- sh ./deploy.sh