-
Notifications
You must be signed in to change notification settings - Fork 574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker task failing #1173
Comments
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Expected Behavior
docker build successful
Actual Behavior
Could not read CA certificate "/certs/client/ca.pem": open /certs/client/ca.pem: no such file or directory
Steps to Reproduce the Problem
Additional Info
my tekton is running on Azure Kubernetes cluster . I'm tying to execute docker command in task but its failing with below error
ERROR: Cannot connect to the Docker daemon at tcp://localhost:2376. Is the docker daemon running?
task :
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: docker-build
labels:
app.kubernetes.io/version: "0.1"
annotations:
tekton.dev/pipelines.minVersion: "0.12.1"
tekton.dev/categories: Image Build
tekton.dev/tags: docker, build-image, push-image, dind
tekton.dev/displayName: docker-build
tekton.dev/platforms: "linux/amd64"
spec:
description: >-
This task will build and push an image using docker.
The task will build an out image out of a Dockerfile.
This image will be pushed to an image registry.
The image will be built and pushed using a dind sidecar over TCP+TLS.
params:
name: image
description: Reference of the image docker will produce.
name: builder_image
description: The location of the docker builder image.
default: docker:stable
name: dind_image
description: The location of the docker-in-docker image.
default: docker:dind
name: dockerfile
description: Path to the Dockerfile to build.
default: ./source/Dockerfile
name: context
description: Path to the directory to use as context.
default: .
name: build_extra_args
description: Extra parameters passed for the build command when building images.
default: ""
name: push_extra_args
description: Extra parameters passed for the push command when pushing images.
default: ""
name: insecure_registry
description: Allows the user to push to an insecure registry that has been specified
default: ""
workspaces:
name: source
volumes:
name: dind-certs
emptyDir: {}
results:
name: IMAGE_DIGEST
description: Digest of the image just built.
sidecars:
image: $(params.dind_image)
name: server
args:
--storage-driver=vfs
--userland-proxy=false
--debug
--insecure-registry=$(params.insecure_registry)
securityContext:
privileged: true
env:
name: DOCKER_TLS_CERTDIR
value: /certs
volumeMounts:
mountPath: /certs/client
name: dind-certs
readinessProbe:
periodSeconds: 1
exec:
command: ['ls', '/certs/client/ca.pem']
steps:
name: docker-build
image: $(params.builder_image)
env:
name: DOCKER_HOST
value: tcp://localhost:2376
name: DOCKER_TLS_VERIFY
value: '1'
name: DOCKER_CERT_PATH$(params.dockerfile) -t $ (params.image) $(params.context)
value: /certs/client
workingDir: $(workspaces.source.path)
script: |
docker build
$(params.build_extra_args)
--no-cache
-f
volumeMounts:
name: dind-certs
taskrun :
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
generateName: docker-
spec:
params:
value: localhost:5000/nocode
taskRef:
name: docker-build
workspaces:
persistentVolumeClaim:
claimName: tekton-pvc
when i changed images im getting below error
Could not read CA certificate "/certs/client/ca.pem": open /certs/client/ca.pem: no such file or directory
description: The location of the docker builder image.
default: docker:1.12.6
description: The location of the docker-in-docker image.
default: docker:1.12.6-dind
The text was updated successfully, but these errors were encountered: