grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
23.92k stars 3.45k forks source link

No Alpine Docker Image in Loki 3.2.0? #14207

Open 3XC1T3D opened 1 month ago

3XC1T3D commented 1 month ago

Describe the bug Actual Loki 3.2.0 Docker Image is based on Debian 12.7. In earlier Releases it was based on Alpine. Bug? or is there no Alpine Image anymore.

To Reproduce docker run -ti --entrypoint="" grafana/loki:3.2.0 cat /etc/debian_version

Expected behavior Alpine Image

Environment:

kpinarci commented 1 month ago

I am experiencing the same issue. Previously, the Loki Docker images were based on Alpine, but now my Docker build process is failing because the grafana/loki:3.2.0 image is based on Debian. The images from version 2.7.1 to 3.1.1 were all Alpine-based.

paul1r commented 1 month ago

The underlying distribution was changed to be gcr.io/distroless/base-nossl:debug, which is Debian-based under the covers.

This move was done to minimize what is present in the actual image, to make a lower CVE/security footprint.

What part of your process is failing?

3XC1T3D commented 1 month ago

In our case... we build our on loki image based on the grafana/loki image. We install all alpine Updates (apk update) to achieve an up to date alpine os and install nginx and supervisord. nginx to secure loki (because loki dont have ssl/tls endpoint feature) and Supervisord to run two processes inside the Container.

due to the missing of apt in the new baseimage, we cant install our packages and we have to rework the complete setup :/

paul1r commented 1 month ago

@3XC1T3D One potential solution to avoid reworking everything would be to use your own version of the Loki Dockerfile, essentially using what was there before this commit, and issuing a make loki-image to build a Loki Docker image.

I do realize this would be an extra set of steps, and is not as "drop in" as it used to be. We are trying to streamline the patching and security updates, and lowering the underlying operating system's footprint was one part of that.

kpinarci commented 1 month ago

@paul1r We have a pipeline where we customize the grafana/loki image with our CA certificates and additional tools. However, the pipeline is failing because the base image has been switched from Alpine to Debian. The APK commands that worked with the previous Alpine-based containers no longer function with the new Loki version v3.2.0, which is unfortunate.