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

Install error :unable to prepare context: #1910

Closed
maoyangLiu opened this issue May 30, 2022 · 6 comments
Closed

Install error :unable to prepare context: #1910

maoyangLiu opened this issue May 30, 2022 · 6 comments
Labels
kind/question Indicates an issue that is a support question.

Comments

@maoyangLiu
Copy link
Contributor

when I install karamda whit the command : hack/local-up-karmada.sh
when Building image for linux/amd64: swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-aggregated-apiserver:latest

  • docker build --build-arg BINARY=karmada-aggregated-apiserver --tag swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-aggregated-apiserver:latest --file hack/../cluster/images/Dockerfile hack/../_output/bin/linux/amd64
    return an error unable to prepare context: The Dockerfile (/root/karmada/cluster/images/Dockerfile) must be within the build context (hack/../_output/bin/linux/amd64)

What is wrong with my configuration or operation

Environment: centos7

  • Karmada version: the master branch
  • Kubernetes version: 1.20.4
  • Others:
@maoyangLiu maoyangLiu added the kind/question Indicates an issue that is a support question. label May 30, 2022
@RainbowMango
Copy link
Member

Is it the first time you use the hack/local-up-karmada.sh?

Are you running the script under the root of the repo?

@maoyangLiu
Copy link
Contributor Author

@RainbowMango It is my first time to use it ,I do run the script in the root directory, but I have the same problem in the home directory,I can't find the cause of the problem

@AnteBox
Copy link

AnteBox commented Jun 20, 2022

@RainbowMango 第一次用,在根目录下运行脚本,但是在home目录下也出现同样的问题,找不到问题的原因

I have the same problem, I upgraded my docker version(form 1.13.1 to 20.10.17). There is no such problem now.

@RainbowMango
Copy link
Member

Thanks @AnteBox. @maoyangLiu what's the docker version you are using? Can you upgrade it and try again?

@ikaven1024
Copy link
Member

ikaven1024 commented Jun 27, 2022

Dockerfile is allowed from outside build-context since docker 18.03. docker/cli#886
@AnteBox @maoyangLiu, plz update your docker above this version.

By the way, @RainbowMango shall we support the docker under v18? we can link the Dockerfile to the build dir.

@RainbowMango
Copy link
Member

By the way, @RainbowMango shall we support the docker under v18? we can link the Dockerfile to the build dir.

I didn't hear anyone ask for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

4 participants