-
Notifications
You must be signed in to change notification settings - Fork 23
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
fix dockerfile to build correct go binary #54
Conversation
Why is ARG HOME removed? |
Because it is still at line 11 Since the duplicated line for TARGEOS and TARGETARCH created a bug I though it was the same for HOME I didn't test it though, I will do it now |
Ok I searched a little but I have no idea how the HOME arg should be used :/ Any help on the subject would be appreciated |
@6543 can you help on this? |
Have a look at https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact From reading the buildx docs again I would confirm that TARGETOS, ... is directly passed by buildx. It then can be used inside the dockerfile / build run process. I guess setting it above FROM will override the values passed by buildx. |
For home I would just add the default to the lower arg home line. |
I spent some time in the docs to understand the arguments coming from buildx and their scopes, see:
Same conclusion as @anbraten :
Since the ARG HOME is not at the top of the file anymore, it is less visible. I could maybe add a line in the README.md about it ? |
hah that it was - thanks ❤️ |
Removed 2 superfluous lines from docker/Dockerfile.multiarch that caused undefined environment variables in the Makefile which caused amd64 go builds in all cases
More details on woodpecker-ci/woodpecker#1443