-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Makefile: build promtail with CGO_ENABLED if GOHOSTOS=GOOS=linux #809
Conversation
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
I want to hold off on this a bit for #762 since I know there will be merge conflicts |
Update: see below Can you please check the Docker container? It fails for me with
Altough the
Other info:
|
Okay, solved it myself. So long story short:
diff --git a/cmd/promtail/Dockerfile b/cmd/promtail/Dockerfile
index a038009..eb0f15e 100644
--- a/cmd/promtail/Dockerfile
+++ b/cmd/promtail/Dockerfile
@@ -9,7 +9,7 @@ WORKDIR /go/src/github.com/grafana/loki
RUN make clean && make promtail
FROM alpine:3.9
-RUN apk add --update --no-cache ca-certificates tzdata
+RUN apk add --update --no-cache ca-certificates tzdata libc6-compat
COPY --from=build /go/src/github.com/grafana/loki/cmd/promtail/promtail /usr/bin/promtail
COPY cmd/promtail/promtail-local-config.yaml /etc/promtail/local-config.yaml
COPY cmd/promtail/promtail-docker-config.yaml /etc/promtail/docker-config.yaml |
@sh0rez thanks for investigating! |
9803dad
to
6ebf6b4
Compare
For promtail to be able to read from the systemd journal, libsystemd.so must be present at runtime. There is currently no package for alpine that provides this file and such, debian should be used instead. A future solution for providing an alpine-based build should be considered in the future and will be tracked in grafana#838. This commit also updates the Dockerfile to default to using the latest loki-build-image. If a specific version is required, it should be provided as a build arg to docker build.
38f6c06
to
c7ccf78
Compare
No description provided.