Last active
August 27, 2024 15:41
-
-
Save lorello/8d4002c58878701574eeefda3c599099 to your computer and use it in GitHub Desktop.
Loki plugin for docker setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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