Hi, I tried to use docker in docker under k8s, the job will stuck without any output or log
Here is the pipeline
---
kind: pipeline
name: deploy
steps:
- name: build-production-image
image: docker:dind
volumes:
- name: docker
path: /var/run/docker.sock
commands:
- docker -v
privileged: true
debug: true
volumes:
- name: docker
host:
path: /var/run/docker.sock
I’m sure docker.sock exists on host machine, also I checked the k8s job, there is no mount volume, is there something wrong with my config?
$ kubectl describe jobs.batch drone-job-69-bdovgsbqylrlrbxnp
Name: drone-job-69-bdovgsbqylrlrbxnp
Namespace: default
Selector: controller-uid=032a9c92-4bf5-11e9-b2e5-00163e062454
Labels: controller-uid=032a9c92-4bf5-11e9-b2e5-00163e062454
job-name=drone-job-69-bdovgsbqylrlrbxnp
Annotations: io.core.build.id: 74
io.core.repo.id: 26
io.core.stage.arch: amd64
io.core.stage.created: 2019-03-21 16:18:49 +0000 UTC
io.core.stage.id: 69
io.core.stage.number: 1
io.core.stage.os: linux
io.core.stage.scheduled: 2019-03-21 16:18:50.364858784 +0000 UTC m=+31249.868014913
io.drone: true
Parallelism: 1
Completions: 1
Start Time: Fri, 22 Mar 2019 00:18:50 +0800
Pods Statuses: 1 Running / 0 Succeeded / 0 Failed
Pod Template:
Labels: controller-uid=032a9c92-4bf5-11e9-b2e5-00163e062454
job-name=drone-job-69-bdovgsbqylrlrbxnp
Containers:
drone-controller:
Image: drone/controller:1.0.0-rc.6
Port: <none>
Host Port: <none>
Environment:
DRONE_LOGS_DEBUG: false
DRONE_RPC_HOST: ci.mydomain.com
DRONE_LIMIT_CPU: 0
DRONE_STAGE_ID: 69
DRONE_RPC_SECRET: XXX
DRONE_REGISTRY_SKIP_VERIFY: false
DRONE_LOGS_PRETTY: false
DRONE_LOGS_TEXT: false
DRONE_RPC_DEBUG: false
DRONE_SECRET_ENDPOINT: http://drone-secrets-service
DRONE_SECRET_SECRET: XXX
DRONE_LIMIT_MEM: 0
DRONE_LOGS_TRACE: false
DRONE_RPC_PROTO: https
DRONE_SECRET_SKIP_VERIFY: false
KUBERNETES_NODE: (v1:spec.nodeName)
DRONE_RUNNER_NAME: (v1:spec.nodeName)
Mounts: <none>
Volumes: <none>
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal SuccessfulCreate 2m25s job-controller Created pod: drone-job-69-bdovgsbqylrlrbxnp-cx2dn