Skip to content
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

skaffold dev doesnt work with v0.3.0 #322

Closed
sirajg opened this issue Apr 3, 2018 · 8 comments
Closed

skaffold dev doesnt work with v0.3.0 #322

sirajg opened this issue Apr 3, 2018 · 8 comments
Assignees
Labels
area/build kind/bug Something isn't working

Comments

@sirajg
Copy link

sirajg commented Apr 3, 2018

skaffold dev does not work with built in examples

Expected behavior

skaffold dev should build, deploy and watch for changes.

Actual behavior

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:
  - imageName: gcr.io/k8s-skaffold/skaffold-example
    workspace: .
  local: {}
deploy:
  kubectl:
    manifests:
      - k8s-*

Steps to reproduce the behavior

  1. ...
  2. ...
@dgageot
Copy link
Contributor

dgageot commented Apr 3, 2018

@sirajg Do you have docker installed? If it is, can you show the output of docker info? What's your kubernetes context?

@dgageot dgageot added the kind/bug Something isn't working label Apr 3, 2018
@sirajg
Copy link
Author

sirajg commented Apr 3, 2018

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

@r2d4
Copy link
Contributor

r2d4 commented Apr 4, 2018

Can you post the output of skaffold dev -v debug?

@dgageot
Copy link
Contributor

dgageot commented Apr 4, 2018

@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?

@sirajg
Copy link
Author

sirajg commented Apr 4, 2018

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...

@sirajg
Copy link
Author

sirajg commented Apr 4, 2018

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" : {

  },

@Ethan826
Copy link

Adding ~/.docker/config.json and filling it with

{ "auths": {} }

as @sirajg's comment suggested fixed the issue for me.

@dgageot
Copy link
Contributor

dgageot commented May 9, 2018

Fixed with #454

@dgageot dgageot closed this as completed May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants