run loki rootless and distroless
Loki (created by grafana) is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus. It is designed to be very cost effective and easy to operate. It does not index the contents of the logs, but rather a set of labels for each log stream.
image Graph.png not found!
What can I do with this? This image will run Loki rootless and distroless, for maximum security and performance.
Why should I run this image and not the other image(s) that already exist? Good question! Because ...
Important
- ... this image runs rootless as 1000:1000
- ... this image has no shell since it is distroless
- ... this image is auto updated to the latest version via CI/CD
- ... this image has a health check
- ... this image runs read-only
- ... this image is automatically scanned for CVEs before and after publishing
- ... this image is created via a secure and pinned CI/CD process
- ... this image is very small
If you value security, simplicity and optimizations to the extreme, then this image might be for you.
Below you find a comparison between this image and the most used or original one.
| image | size on disk | init default as | distroless | supported architectures |
|---|---|---|---|---|
| 11notes/loki | 32MB | 1000:1000 | ✅ | amd64, arm64, armv7 |
| grafana/loki | 131MB | 1000:1000 | ✅ | amd64, arm64, armv7 |
auth_enabled: false
server:
http_listen_port: 3100
common:
instance_addr: 127.0.0.1
path_prefix: /loki/var
storage:
filesystem:
chunks_directory: /loki/var/chunks
rules_directory: /loki/var/rules
replication_factor: 1
ring:
kvstore:
store: inmemory
schema_config:
configs:
- from: 2020-10-24
store: tsdb
object_store: filesystem
schema: v13
index:
prefix: index_
period: 24h
ruler:
alertmanager_url: http://localhost:9093
analytics:
reporting_enabled: false- /loki/etc - Directory of your config
- /loki/var - Directory of all dynamic data and database
name: "monitoring"
x-lockdown: &lockdown
# prevents write access to the image itself
read_only: true
# prevents any process within the container to gain more privileges
security_opt:
- "no-new-privileges=true"
services:
loki:
image: "11notes/loki:3.6.5"
<<: *lockdown
environment:
TZ: "Europe/Zurich"
volumes:
- "loki.etc:/loki/etc"
- "loki.var:/loki/var"
ports:
- "3000:3100/tcp"
networks:
frontend:
restart: "always"
volumes:
loki.etc:
loki.var:
networks:
frontend:To find out how you can change the default UID/GID of this container image, consult the RTFM.
| Parameter | Value | Description |
|---|---|---|
user |
docker | user name |
uid |
1000 | user identifier |
gid |
1000 | group identifier |
home |
/loki | home directory of user docker |
| Parameter | Value | Default |
|---|---|---|
TZ |
Time Zone | |
DEBUG |
Will activate debug option for container image and app (if available) | |
LOKI_CONFIG |
If not using a yml file you can provide your config as inline yml directly in your compose |
These are the main tags for the image. There is also a tag for each commit and its shorthand sha256 value.
It is my opinion that the :latest tag is a bad habbit and should not be used at all. Many developers introduce breaking changes in new releases. This would messed up everything for people who use :latest. If you don’t want to change the tag to the latest semver, simply use the short versions of semver. Instead of using :3.6.5 you can use :3 or :3.6. Since on each new version these tags are updated to the latest version of the software, using them is identical to using :latest but at least fixed to a major or minor version. Which in theory should not introduce breaking changes.
If you still insist on having the bleeding edge release of this app, simply use the :rolling tag, but be warned! You will get the latest version of the app instantly, regardless of breaking changes or security issues or what so ever. You do this at your own risk!
docker pull 11notes/loki:3.6.5
docker pull ghcr.io/11notes/loki:3.6.5
docker pull quay.io/11notes/loki:3.6.5
This image supports unraid by default. Simply add -unraid to any tag and the image will run as 99:100 instead of 1000:1000.
This image supports nobody by default. Simply add -nobody to any tag and the image will run as 65534:65534 instead of 1000:1000.
Important
This image is not based on another image but uses scratch as the starting layer. The image consists of the following distroless layers that were added:
- 11notes/distroless - contains users, timezones and Root CA certificates, nothing else
- 11notes/distroless:localhealth - app to execute HTTP requests only on 127.0.0.1
Tip
- Use a reverse proxy like Traefik, Nginx, HAproxy to terminate TLS and to protect your endpoints
- Use Let’s Encrypt DNS-01 challenge to obtain valid SSL certificates for your services
This image is provided to you at your own risk. Always make backups before updating an image to a different version. Check the releases for breaking changes. If you have any problems with using this image simply raise an issue, thanks. If you have a question or inputs please create a new discussion instead of an issue. You can find all my other repositories on github.
created 11.02.2026, 10:16:42 (CET)

