skaffold not building image with useDockerCLI true

208 views
Skip to first unread message

edh

unread,
May 20, 2020, 5:23:46 PM5/20/20
to skaffold-users
Hello.

I am currently triying to build (skaffold build) using the docker cli instead of the docker API, this is my skaffold.yaml manifest:

apiVersion: skaffold/v2beta4
kind: Config
metadata:
  name: test-api
build:
  tagPolicy:
    dateTime:
      format: 20060102t150405
      timezone: "America/Mexico_City"  
  artifacts:
  local:
    useDockerCLI: true
deploy:
  kubectl:
    manifests:
    - k8s/test-api.yaml

However when I run skaffold build I get the following error:

skaffold build
Generating tags...
Checking cache...
 - gcr.io/test-project/test-api: Not found. Building
ERRO[0002] failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial unix /var/run/docker.sock: connect: connection refused 
error during connect: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=80yslsofmvjaa16b2flmc8kmn&shmsize=0&t=gcr.io%2Ftest-project%2Ftest-api%3A20200520t160201&target=&ulimits=null&version=1: context canceled
couldn't build "gcr.io/test-project/test-api": running build: exit status 1

I have the 1.10.0 version of skaffold

Is there anything I am going wrong?

Thank you

Abhishek Soni

unread,
May 21, 2020, 2:57:47 AM5/21/20
to edh, skaffold-users
Hey,

it looks like Docker daemon is not running on the host machine. Can you verify if you are able to run docker commands on the host machine? Also check the user which running docker command is added to docker group to avoid using sudo. 

Thanks 

--
You received this message because you are subscribed to the Google Groups "skaffold-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skaffold-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skaffold-users/4d36b7a7-473c-487a-85ca-9330755bf0da%40googlegroups.com.

edh

unread,
May 21, 2020, 10:46:32 AM5/21/20
to skaffold-users
Hello.

This one is on me, rookie mistake. I tought that by using useDockerCLI the docker daemon would not be necessary. 

Thank you
To unsubscribe from this group and stop receiving emails from it, send an email to skaffol...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages