-
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
fix(build): make dev builds identical to release builds #1176
Conversation
With that, we are going to introduce the following differences between dev and prod images:
Are we fine with it? |
I don't think it's that big a deal, but if we want to stay with the current setup, we should probably use a Debian image and manually install Go instead of using the Go image directly. Why do we even want the dev image to be different from the prod one? Additional tooling? In that case it should be named differently (debug), and we should publish it for prod as well. WDYT? |
Not sure. I would expect prod image to build. Dev-builds should be as close as possible to production ones. I don;t think it is debug image, and debug images are different topic |
19178f6
to
be8fdbf
Compare
be8fdbf
to
fdcd0ad
Compare
fdcd0ad
to
943de55
Compare
Makefile
Outdated
build-container-multiplatform-dev: REPO_URL="$(OPENSOURCE_REPO_URL)" | ||
build-container-multiplatform-dev: build-container-multiplatform |
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.
Does it work as expected 😮 ?
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.
No, but it's pretty close. I set REPO_URL
to OPENSOURCE_REPO_URL
by default, and then used the former in the release targets.
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.
so it works as
build-container-multiplatform-dev: REPO_URL="$(OPENSOURCE_REPO_URL)" build-container-multiplatform
?
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.
Works more or less like:
build-container-multiplatform-dev:
make build-container-multiplatform REPO_URL="$(OPENSOURCE_REPO_URL)"
except it doesn't start a new shell, and you can do more stuff in the variable assignment.
943de55
to
005f7b9
Compare
Make the dev images identical to release images. We can add debug images containing additional tooling separately, but the dev images should just have a different binary, and be otherwise the same as the release ones.
This also fixes an issue where the dev Dockerfile uses the official Go image as the base for the final stage, and copies journalctl and dependencies from a debian image. This is consistent with the production image, but that uses scratch, while the golang image also uses Debian as base. As a result, if the debian versions diverge, it's possible to get cryptic errors about glibc versions, as has recently happened in our CI. See for example https://github.com/SumoLogic/sumologic-otel-collector/actions/runs/5355217286/jobs/9713524369.