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

docs: build custom-plugin in docker not working #3385

Closed
Vacant2333 opened this issue Apr 3, 2024 · 5 comments · Fixed by #3406
Closed

docs: build custom-plugin in docker not working #3385

Vacant2333 opened this issue Apr 3, 2024 · 5 comments · Fixed by #3406
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.

Comments

@Vacant2333
Copy link
Contributor

What happened:
run this command for build the example custom-plugin:

docker run -v `pwd`:/work golang:1.14-alpine sh -c "cd /work && apk add musl-dev gcc && go build -buildmode=plugin magic.go"

will cause:
5077b9783c348f9a248a4e2e9ab08191

and i find out that we have the go.mod file before:
https://github.com/volcano-sh/volcano/pull/1218/files#diff-98b4a278f2b96122392377740a91e7d348ecbf1323e06be2265c3e3ecf4f09bb

but we remove the go.mod at this pr:
#1988

im not sure how to resoulve this problem, i have try update the command like:

docker run -v `pwd`:/work golang:1.20-alpine sh -c "cd /work && apk add musl-dev gcc git && go mod init custom-plugin && go mod tidy && go build -buildmode=plugin magic.go"

but it will cause:
image

or maybe we can run this command at /volcano, just like:

docker run -v `pwd`:/volcano golang:1.20.1-alpine sh -c "cd /volcano/example/custom-plugin && apk add musl-dev gcc && go mod tidy && go build -buildmode=plugin magic.go"

i didnt find a good way to resoulve this problem, can u tell me a good way to fix it, and im happy to raise a pr to fix it!

What you expected to happen:
Build custom-plugin in docker

How to reproduce it (as minimally and precisely as possible):

cd example/custom-plugin
docker run -v `pwd`:/work golang:1.20-alpine sh -c "cd /work && apk add musl-dev gcc git && go mod download && go build -buildmode=plugin magic.go"

Environment:

  • Volcano Version: latest
  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release): MacOS
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@Vacant2333 Vacant2333 added the kind/bug Categorizes issue or PR as related to a bug. label Apr 3, 2024
@Monokaix
Copy link
Member

Monokaix commented Apr 7, 2024

I think docker build command should change to something like docker run -v pwd:/work golang:1.20-alpine sh -c "cd /work && apk add musl-dev gcc && go build -buildmode=plugin example/custom-plugin/magic.go and we should also change readme file to let user run a complete example.

@Vacant2333
Copy link
Contributor Author

I think docker build command should change to something like docker run -v pwd:/work golang:1.20-alpine sh -c "cd /work && apk add musl-dev gcc && go build -buildmode=plugin example/custom-plugin/magic.go and we should also change readme file to let user run a complete example.

agree! i will raise a pr to fix it

@Monokaix
Copy link
Member

Monokaix commented Apr 8, 2024

/good-first-issue

@volcano-sh-bot
Copy link
Contributor

@Monokaix:
This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

/good-first-issue

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@volcano-sh-bot volcano-sh-bot added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Apr 8, 2024
@Vacant2333
Copy link
Contributor Author

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants