I am using Build Toolkit to build docker image for each microservice.
./build.sh
export DOCKER_BUILDKIT=1
# ....
docker build -t ....
# ...
This works on my machine with docker (18.09.2).
However, it does not work with Jenkins, that I setup as following :
EKS is provisioned with a Terraform module
module "eks" { source = "terraform-aws-modules/eks/aws" version = "5.0.0" # .... }
Jenkins is deployed on EKS (
v1.12.10-eks-ffbd9
,docker://18.6.1
) via this Helm Chart.Jenkins plugins as defined in Values of the helm release:
- kubernetes:1.18.1
- workflow-job:2.33
- workflow-aggregator:2.6
- credentials-binding:1.19
- git:3.11.0
- blueocean:1.19.0
- bitbucket-oauth:0.9
Jenkins Pipeline is declarative, and it uses a Pod template where the container image is
docker:18-dind
and the container name isdind
.This is my Jenkinsfile
pipeline { agent { kubernetes { defaultContainer 'jnlp' yamlFile 'jenkins-pod.yaml' } } stages { stage('Build Backends') { steps { container('dind') { sh 'chmod +x *sh' sh './build.sh -t=dev' } containerLog 'dind' } } }
}
When Jenkins executes this pipeline, it shows this error :
buildkit not supported by daemon
I am not sure which software should I upgrade to make docker-buildkit work ? and to which version ?
- Terraform eks Module which is now 5.0.0 ?
Or
- docker:18-dind image which behaves like environment of the ephemeral Jenkins slaves ?
Or
- the Jenkins Plugin
kubernetes:1.18.1
?
DOCKER_BUILDKIT=1 docker build -t ....
in your./build.sh
? – Rafaf Tahsin