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

Docker cloudbuilder folder copy issues #442

Closed
ekoome opened this issue Apr 23, 2018 · 4 comments · Fixed by #489
Closed

Docker cloudbuilder folder copy issues #442

ekoome opened this issue Apr 23, 2018 · 4 comments · Fixed by #489
Labels

Comments

@ekoome
Copy link

ekoome commented Apr 23, 2018

Issues without logs and details are more complicated to fix.
Please help us!

Expected behaviour

Docker COPY command should copy folder and contents to docker image.

Actual behaviour

Step 2/7 : COPY bin /app/bin
COPY failed: stat /var/lib/docker/tmp/docker-builder232188484/bin: no such file or directory

Information

Confirmed that the folder is part of context generated by Skaffold (context.tar.gz) but unable to COPY the folder and contents using COPY command.

Skaffold version: 0.4.0
Operating system: Windows 10
Content of skaffold.yaml:
apiVersion: skaffold/v1alpha2
kind: Config
build:
  artifacts:
  - imageName: gcr.io/my-project/dtelapi
    workspace: .
deploy:
  kubectl:
    manifests:
      - kubernetes/test/deployment.yaml
profiles:
  - name: gcb
    build:
      googleCloudBuild:
        projectId: my-project

Docker File:

FROM node:8.6.0-alpine

COPY bin /app/bin
COPY build /app/build
COPY package.json npm-shrinkwrap.json /app

WORKDIR /app

RUN npm install

CMD ["npm", "start"]

Steps to reproduce the behavior

  1. create basic project with folder
  2. copy folder and contents to Cloud builder docker context
@ekoome
Copy link
Author

ekoome commented Apr 23, 2018

Figured out the problem is that the context is generated from windows and files are extracted as folder\folder\file in docker image. How do I force the context to unix format?

@masduo
Copy link

masduo commented May 8, 2018

@dlorenc is this merge available in releases yet? the latest is v0.5.0 which still fails on windows:

Step 3/22 : COPY ./src /app/src
Error: running skaffold steps: build: build step: running build for artifact: running build: COPY failed: stat /var/lib/docker/tmp/docker-builderxxx/src: no such file or directory

@dgageot
Copy link
Contributor

dgageot commented Jul 6, 2018

@masduo Have you tried 0.9.0?

@masduo
Copy link

masduo commented Jul 16, 2018

@dgageot just tried and i can confirm that the issue is fixed in the latest version 0.10.0, thanks

@r2d4 r2d4 closed this as completed Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants