-
Notifications
You must be signed in to change notification settings - Fork 733
CI, build 4: Cleanup Dockerfile base images #3986
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
f545aaf to
65b6293
Compare
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
65b6293 to
ef1c2f0
Compare
| ENV TERM="xterm" | ||
| ENV LANG="C.UTF-8" | ||
| ENV LC_ALL="C.UTF-8" | ||
| ENV TZ="America/Los_Angeles" |
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.
?
| FROM --platform=$BUILDPLATFORM debian:$DEBIAN_VERSION AS tooling-base | ||
| SHELL ["/bin/bash", "-o", "errexit", "-o", "errtrace", "-o", "functrace", "-o", "nounset", "-o", "pipefail", "-c"] | ||
| ENV DEBIAN_FRONTEND="noninteractive" | ||
| ENV TERM="xterm" |
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.
?
| SHELL ["/bin/bash", "-o", "errexit", "-o", "errtrace", "-o", "functrace", "-o", "nounset", "-o", "pipefail", "-c"] | ||
| ENV DEBIAN_FRONTEND="noninteractive" | ||
| ENV TERM="xterm" | ||
| ENV LANG="C.UTF-8" |
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.
Isn't this the default locale?
| ENTRYPOINT ["/docker-entrypoint.sh"] | ||
| CMD ["bash", "--login", "-i"] | ||
|
|
||
| # convert GO_VERSION=1.16 to the latest release such as "go1.16.1" |
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.
| echo "Failed retrieving go download for $arch: $GO_VERSION"; \ | ||
| exit 1; \ | ||
| } | ||
|
|
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.
This complicates the Dockerfile too much
AkihiroSuda
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.
Sorry, I don't get the advantages of this
Yes, but usually fixed within a day |
|
Alternative: |
Commented briefly on #3997 The point is that our current Dockerfile is retrieving massive amount of data for no good reason, and heavily depends on Hub for stuff that is very easy to do without. We just disagree on the way to tackle these problems, so, I'll just retract this proposal. |
For context, see #3940, #3924, and the start of this PR cycle at #3983.
On top of #3985
We currently depend on two distincts golang image (bookworm and alpine), and we also download a golang archive from go servers.
Depending at all on docker images is a significant source of issues:
This PR does cleanup our base images.
It bases every build stage on a single image, a naked bookworm, and uses the golang version of go.
That will reduce our network traffic with Hub, improve cacheability, and make our life less miserable when new versions of go arrive.
Finally, this will drastically reduce network com with go servers, as currently the archive is never cached and always downloaded, for every target we build. There should be a speed boost out of that for the later build stages.
(*) this PR does fix the current canary bustage