-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
CI: Introduce goyacc and other required tools into cmd/loki/Dockerfile #5323
Conversation
loki-build-image doesn't seem to support arm or arm64. |
From what I can gather, I may be able to build loki-build-image on arm and arm64 using QEMU, but I won't be able to push it anywhere that CI will be able to use it. I'm going to need some guidance. Would you prefer that I send a feature request for multi architecture support for loki-build-image, or duplicate the go toolset in the cmd/loki/Dockerfile* images? This is currently blocking my other PR: #5306 |
# because these dependencies are required by the Makefile in certain | ||
# circumstances. This should be removed and the base image above changed | ||
# from golang to loki-build-image once the latter becomes available for arm. | ||
RUN GO111MODULE=on go install \ |
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 guess you want to add this to the build-image not the actual Loki image no ?
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.
If you're referring to the loki-build-image, its already part of that.
The reason that I want to add it here, is because make BUILD_IN_CONTAINER=false loki
below in this same file uses it. And given that BUILD_IN_CONTAINER=false here, goyacc is not found.
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.
As shown here:
Line 317 in da9b4c9
goyacc -p $(basename $(notdir $<)) -o $@ $< |
goyacc is used directly because of BUILD_IN_CONTAINER=false
@cyriltovena, according to @owen-d, y'all don't actually want to build these files in CI: |
What this PR does / why we need it:
cmd/loki/Dockerfile currently uses golang:1.17.2
The latter does not contain the goyacc command.
This means that the Dockerfile's entrypoint will fail if any yacc files need to be regenerated.
Example: https://drone.grafana.net/grafana/loki/8367/3/3
cmd/loki/Dockerfile.debug, however, uses grafana/loki-build-image instead of golang:1.17.2.
grafana/loki-build-image is based on golang:1.17.6, but with goyacc and other tools added.
Rather than add those tools to cmd/loki/Dockerfile, causing duplication, I'd like to change the Dockerfile to use loki-build-image instead.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Checklist
CHANGELOG.md
about the changes.