Makefile: build promtail with CGO_ENABLED if GOHOSTOS=GOOS=linux (#809)
This commit modifies the Makefile to build promtail with CGO_ENABLED if both GOHOSTOS and GOOS are set to linux. To facilitate the Docker container utilizing the journal support, the container for promtail had to be modified to be based on top of debian. The sd-journal library depends on libsystemd.so being present at runtime. As alpine currently does not have a package for systemd, the easiest approach is to change the base image to debian:stretch-slim. A future solution for providing an alpine-based build will be considered in the future and discussion for the approach will be tracked in #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.
Showing
- Makefile 28 additions, 12 deletionsMakefile
- cmd/docker-driver/Dockerfile 1 addition, 1 deletioncmd/docker-driver/Dockerfile
- cmd/loki-canary/Dockerfile 1 addition, 1 deletioncmd/loki-canary/Dockerfile
- cmd/loki/Dockerfile 1 addition, 1 deletioncmd/loki/Dockerfile
- cmd/promtail/Dockerfile 8 additions, 3 deletionscmd/promtail/Dockerfile
Loading
Please register or sign in to comment