Skip to content

shell in docker executor isn't bash

I've configure the gitlab-runner with the following config.toml

concurrent = 1
check_interval = 0

[[runners]]
  name = "Main runner"
  url = "https://git.viriciti.com/ci"
  token = "xxx"
  executor = "docker"
  shell = "bash"
  [runners.docker]
    tls_verify = false
    image = "docker:latest"
    privileged = true
    disable_cache = false
    volumes = ["/root/.docker", "/cache"]
    # volumes = ["/root/.docker", "/var/run/docker.sock"]
  [runners.cache]
    Insecure = false

To test what kind of shell the build scripts are using I made this 'gitlab-ci.yml' file

build:
  script:
    - echo $0

It reports /bin/sh and not /bin/bash as I would expect. Is there another way to set the shell type or is this a bug?

Thanks!