shell executor: docker: command not found
Hi, i'm running 2 executor:
- shell executor (tagged: shell_executor)
- docker executor (tagged: docker_executor)
the docker executor runs docker commands just fine, but the shell executor throws:
I've already set gitlab-runner to the docker's usergroup.
Logging whoami
in the CI gives: gitlab-runner
.
What i'm trying to achive is deploy a docker container on the host's docker service.
these are the settings i'm running:
Gitlab-runners'machine: Ubuntu 18.10
.gitlab-ci.yml
stages:
- build
- deploy
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "/certs"
before_script:
- export PATH=$PATH:/usr/bin:/etc/docker
build_staging:
stage: build
services:
- docker:19.03.1-dind
image: docker:19.03.1
script:
- apk add --update --no-cache py2-pip nodejs nodejs-npm yarn
- yarn install
- yarn build
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t camoncash .
- export TAG=$(echo $CI_COMMIT_SHA | cut -c 1-7)
- docker tag camoncash:latest $CI_REGISTRY/camoncash/camsite/camsite.frontend:$TAG
- docker tag camoncash:latest $CI_REGISTRY/camoncash/camsite/camsite.frontend:$CI_COMMIT_REF_NAME
- docker push $CI_REGISTRY/camoncash/camsite/camsite.frontend:$TAG
- docker push $CI_REGISTRY/camoncash/camsite/camsite.frontend:$CI_COMMIT_REF_NAME
tags:
- docker_executor
deploy_staging:
stage: deploy
script:
- export TAG=$(echo $CI_COMMIT_SHA | cut -c 1-7)
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull -u $CI_REGISTRY/camoncash/camsite/camsite.frontend:$CI_COMMIT_REF_NAME
- docker stop camoncash || true && docker rm camoncash || true
- docker run --name=camoncash -p 3000:3000 -itd $CI_REGISTRY/camoncash/camsite/camsite.frontend:$CI_COMMIT_REF_NAME
tags:
- shell_executor
/etc/gitlab-runner/config.toml
[[runners]]
name = "DockerRunner"
url = "https://gitlab.com/"
token = "TOKEN"
executor = "docker"
[runners.custom_build_dir]
[runners.docker]
tls_verify = false
image = "docker:latest"
privileged = true
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/certs/client", "/cache"]
shm_size = 0
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[[runners]]
name = "ShellRunner"
url = "https://gitlab.com/"
token = "TOKEN"
executor = "shell"
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
me atm (╯°□°)╯︵ ┻━┻
Edited by paolomangiadev