Gitlab Runner local does not provide bash in containers
Dear All ,
There seems to be an error with local gitlab runner when entering into the container for executing script.
A simple script job
image: docker:dind
stages:
- init
clone:
stage: init
image: alpine/git
script:
- git clone ssh://git@XXXX.git
When running the Pipeline with gitlab => OK
$ git clone ssh://git@git.XXXXXX.git
Cloning into 'XXXX'...
When running locally gitlab-runner exec docker clone
git: 'sh' is not a git command. See 'git --help'
It is because in the base image alpine/git
( https://hub.docker.com/r/alpine/git ) ( https://github.com/alpine-docker/git/blob/master/Dockerfile )
The entrypoint and commands are :
ENTRYPOINT ["git"]
CMD ["--help"]
But this should works locally since it is working on the server
Edited by Sébastien Tolron