Skip to content

Instantly share code, notes, and snippets.

@lorello
Last active August 27, 2024 15:41
Show Gist options
  • Save lorello/8d4002c58878701574eeefda3c599099 to your computer and use it in GitHub Desktop.
Save lorello/8d4002c58878701574eeefda3c599099 to your computer and use it in GitHub Desktop.
Loki plugin for docker setup
#!/bin/bash
set -ex
if docker plugin inspect loki > /dev/null; then
echo "Loki plugin already installed"
else
docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions
fi
if [[ -f /etc/docker/daemon-loki.json ]]; then
mv -f /etc/docker/daemon-loki.json /etc/docker/daemon.json
service docker restart
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment