Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.92k stars 397 forks source link

fork/exec /root/.draft/plugins/draft-pack-repo/bin/pack-repo: no such file or directory #779

Closed disha94 closed 6 years ago

disha94 commented 6 years ago

Hi All, I am trying to run draft in a container, so as a part of the process, I downloaded the latest binary (draft-v0.14.1-linux-amd64.tar.gz) , copied the binary file to /usr/local/bin and when I tried to run "draft init", I am getting this error: fork/exec /root/.draft/plugins/draft-pack-repo/bin/pack-repo: no such file or directory

Base image: alpine.

Can someone help me with this? Am I missing anything?

radu-matei commented 6 years ago

Hi, @disha94 ! The first thing that comes to mind about this issue is that the base Alpine image doesn't come with a git installation, which Draft requires in order to install plugins and download the default packs.

disha94 commented 6 years ago

Hi @radu-matei , I know but I am already adding git installation part while bringing up the image: "apk add --no-cache git"

disha94 commented 6 years ago

So basically there are two observations, when I try "draft init" for the first time I get this error: Installing default plugins... env: can't execute 'bash': No such file or directory Error: plugin install hook for "pack-repo" exited with error

and after that, on trying "draft init", I am getting this error: Installing default plugins... Installation of default plugins complete Installing default pack repositories... Error: fork/exec /root/.draft/plugins/draft-pack-repo/bin/pack-repo: no such file or directory

If this helps you to debug

bacongobbler commented 6 years ago

Try installing bash on your alpine container :)

radu-matei commented 6 years ago

For any future reference, until we document the installation in an Alpine Linux container, here's what you need to add in your container in order to make it work:

Now you're ready to draft init - let me know if this works for you, as I just tested in an Alpine container.

disha94 commented 6 years ago

Yes @radu-matei and @bacongobbler , looks like the issue was with bash only. Its working fine now..Thanks a lot for this quick resolution. Really appreciate it.. 👍 :)

bacongobbler commented 6 years ago

Glad we were able to unblock you. Let's follow up in #780 to make this process more known. Thanks!

disha94 commented 6 years ago

Also, there is one more thing I would like to bring to your notice, I am facing issue while installing the binary as well. So when I run "wget https://azuredraft.blob.core.windows.net/draft/draft-v0.14.1-linux-amd64.tar.gz" from my local it is working, but from container when I try I get TLS error. Can you guys check this as well?

bacongobbler commented 6 years ago

works fine for me. Did you update your TLS config via apk update && apk add ca-certificates && update-ca-certificates && apk add openssl as @radu-matei documented above?

disha94 commented 6 years ago

Okay right... didn't check after this change. Its working now..Thanks a lot again.. :)