-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Dockerfile: use GO_VERSION build-arg for overriding Go version #2008
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
Conversation
This allows overriding the version of Go without making modifications in the
source code, which can be useful to test against multiple versions.
For example:
make GO_VERSION=1.13beta1 -f docker.Makefile binary
Signed-off-by: Sebastiaan van Stijn <[email protected]>
|
ping @silvin-lubecki @vdemeester ptal /cc @seemethere |
Codecov Report
@@ Coverage Diff @@
## master #2008 +/- ##
=======================================
Coverage 56.79% 56.79%
=======================================
Files 311 311
Lines 21836 21836
=======================================
Hits 12402 12402
Misses 8519 8519
Partials 915 915 |
vdemeester
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🐯
silvin-lubecki
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about removing the default args and force to set it, and define it only one time in the Makefile? You would then have only one place to update the go version?
|
@silvin-lubecki it's good to have a default in the Dockerfile; Dockerfiles should be "buildable" without having to pass specific build-args |
|
That default could be |
kolyshkin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This allows overriding the version of Go without making modifications in the
source code, which can be useful to test against multiple versions.
For example: