dockerfiles/grafana.sh

27 lines
576 B
Bash
Raw Normal View History

2024-05-29 01:30:15 +00:00
#!/bin/sh
set -eu
if [ "$#" != 1 ]; then
printf 'Usage: grafana.sh <version>\n' >&2
exit 2
fi
VERSION="$1"
if [ -d grafana ]; then
cd grafana
git fetch -p
git checkout "v${VERSION}"
cd packaging/docker/custom/
else
git clone https://github.com/grafana/grafana.git --branch "v${VERSION}"
cd grafana
cd packaging/docker/custom/
fi
docker buildx build --pull \
. \
--build-arg GRAFANA_VERSION="${VERSION}" \
--build-arg GF_INSTALL_PLUGINS=frser-sqlite-datasource \
--push --tag "quay.io/remram44/grafana:${VERSION}-sqlite"