-
Notifications
You must be signed in to change notification settings - Fork 36
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
Change Dockerfile base images #101
Conversation
@@ -1,6 +1,10 @@ | |||
FROM alpine:3.11.2 | |||
FROM --platform=linux/amd64 golang:1.18.3-buster AS builder |
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.
We should use golang 1.17 image since we have this version in go.mod.
However, I would go with go-runner image that wraps stderr and stdout. We are using klog in this project and there is a KEP to remove flags like --log-file
link. Additionaly, the whole k8s ecosystem is moving towards that solution https://github.com/kubernetes/kubernetes/blob/release-1.24/build/common.sh#L94
So maybe it's better to use image k8s.gcr.io/build-image/go-runner:v2.3.1-go1.17.11-bullseye.0
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.
Thanks @mfranczy
You right, will change to go 1.17
But this is image used only for the builder, and not for the container itself
I'm using here gcr.io/distroless/static
for the container image itself
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.
ah yes, you're right I overlooked. But for the container itself maybe we could use the k8s.gcr.io/build-image/go-runner:v2.3.1-go1.17.11-bullseye.0
anyway? Just to keep an option to still write logs to a file if somebody wants.
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.
Additionaly, is there any reason why you used buster
for the build stage?
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.
But for the container itself maybe we could use the k8s.gcr.io/build-image/go-runner:v2.3.1-go1.17.11-bullseye.0 anyway?
I will change the container image and will update
Additionaly, is there any reason why you used buster for the build stage?
I saw some examples in other repo which use this for the build container, no specific reason
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.
I saw some examples in other repo which use this for the build container, no specific reason
So to align we could use golang:1.17.11-bullseye
.
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.
@mfranczy as we discussed, changed the base images:
container image to registry.redhat.io/ubi9/ubi-micro
build image to golang:1.17.11
Please take a look
…e image Signed-off-by: Nir Argaman <[email protected]>
@nirarg: The following test failed, say
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. I understand the commands that are listed here. |
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mfranczy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@mfranczy this is the dockerfile I use to build the image localy
Do you think we can use it upstream?
fix issue: #50