skaffold dev does not work with built in examples
skaffold dev should build, deploy and watch for changes.
``.../getting-started$ skaffold dev
Starting build...
Found [docker-for-desktop] context, using local docker daemon.
WARN[0000] run: build: build step: running build: read auth configs: error getting credentials - err: exit status 1, out:no hostname in URL`
Watching for changes...
### Information
This error is seen only in v0.3.0. Same setup with v0.2.0 works.
Skaffold version: v.0.3.0
Operating system: mac os
Content of skaffold.yaml: ...
apiVersion: skaffold/v1alpha2
kind: Config
build:
artifacts:
```
@sirajg Do you have docker installed? If it is, can you show the output of docker info? What's your kubernetes context?
kubectl config get-contexts
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
* docker-for-desktop docker-for-desktop-cluster docker-for-desktop
minikube minikube minikube
docker info
Containers: 220
Running: 118
Paused: 0
Stopped: 102
Images: 388
Server Version: 18.03.0-ce-rc3
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfd04396dc68220d1cecbe686a6cc3aa5ce3667c
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.87-linuxkit-aufs
Operating System: Docker for Mac
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.952GiB
Name: linuxkit-025000000001
ID: CD7P:YN72:IG3C:HCJV:W34J:TB62:2AEH:72CM:RMC6:WFEX:I6BO:WEQG
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 457
Goroutines: 364
System Time: 2018-04-03T20:08:51.8091453Z
EventsListeners: 2
HTTP Proxy: docker.for.mac.http.internal:3128
HTTPS Proxy: docker.for.mac.http.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Same setup works with skaffold v.0.2.0
Can you post the output of skaffold dev -v debug?
@sirajg It might be an issue with your ~/.docker/config.json file. This file contains the configuration to connect to private registries. Can you rename this file and try again?
skaffold/examples/getting-started$ skaffold dev -v debug
INFO[0000] Skaffold &{Version:v0.3.0 GitVersion: GitCommit:0e9951cbab558661dcd189a0ccd8ed1d13a402f2 GitTreeState:clean BuildDate:2018-03-30T00:25:10Z GoVersion:go1.10 Compiler:gc Platform:darwin/amd64}
INFO[0000] Using kubectl context: docker-for-desktop
DEBU[0000] skipPush value not present. defaulting to cluster default true (minikube=true, d4d=true, gke=false)
DEBU[0000] Checking base image golang:1.9.4-alpine3.7 for ONBUILD triggers.
DEBU[0000] Found onbuild triggers [] in image golang:1.9.4-alpine3.7
INFO[0000] Found dependencies for dockerfile [main.go]
INFO[0000] Added watch for <path>/skaffold/examples/getting-started/Dockerfile
INFO[0000] Added watch for <path>/skaffold/examples/getting-started/main.go
INFO[0000] Watch is ready
Starting build...
Found [docker-for-desktop] context, using local docker daemon.
DEBU[0000] Running docker build: context: ., dockerfile: Dockerfile
WARN[0000] run: build: build step: running build: read auth configs: error getting credentials - err: exit status 1, out: `no hostname in URL`
Watching for changes...
Without the ~/.docker/config.json file, get this error:
WARN[0000] run: build: build step: running build: read auth configs: docker config: opening docker config: open <home>/.docker/config.json: no such file or directory
config.json has
"auths" : {
},
Adding ~/.docker/config.json and filling it with
{ "auths": {} }
as @sirajg's comment suggested fixed the issue for me.
Most helpful comment
Adding
~/.docker/config.jsonand filling it withas @sirajg's comment suggested fixed the issue for me.