Unable to build the docker image with skaffold dev

538 views
Skip to first unread message

Shiv Shankar

unread,
Mar 29, 2018, 2:02:59 PM3/29/18
to skaffold-users
Hi,
I am getting an error when I left skaffold to create docker image on docker dev. Am I doing wrong?


Here is error



WARN[0001] run: build step: running build: COPY failed: stat /var/lib/docker/tmp/docker-builder168298683/target/hola-demo-0.0.1-SNAPSHOT.jar: no such file or directory 
ERRO[0002] run: running skaffold steps: running watch: adding deps for artifact: getting dockerfile dependencies: expanding dockerfile paths: getting file info: stat target/hola-demo-0.0.1-SNAPSHOT.jar: no such file or directory 


Dockerfile:
FROM openjdk:8-jre-alpine
COPY ./target/hola-demo-0.0.1-SNAPSHOT.jar /usr/src/hola/
WORKDIR /usr/src/hola
EXPOSE 8080
CMD ["java", "-jar", "/usr/src/hola/hola-demo-0.0.1-SNAPSHOT.jar"]



skaffold.yaml :

apiVersion: skaffold/v1alpha1
kind: Config
build:
  artifacts:
  - imageName: example.com/hola-demo
    workspace: .
  local: {}
deploy:
  kubectl:
    manifests:
    - paths:
      - k8s-*.yaml
      parameters:
        IMAGE_NAME: example.com/hola-demo


Any help??



Greg Whorley

unread,
May 5, 2020, 12:53:38 PM5/5/20
to skaffold-users
I am running into the exact same problem. Using docker for desktop on a mac and am using nearly the same skaffold config as the original poster. Why is skaffold trying to copy files from a non-existent /var/lib/docker/tmp directory instead of my current working directory?

Greg Whorley

unread,
May 5, 2020, 1:54:09 PM5/5/20
to skaffold-users
I was able to resolve my problem by manually building my app's docker image locally first. Afterwards, I can run skaffold dev and the build phase moves past the copy error and finishes building the image.
Reply all
Reply to author
Forward
0 new messages