grafana/run_container_build.sh
Andreas Gerstmayr daef40c390 Rebase to grafana-6.7.3 for 8.3
Resolves: #1807323
Resolves: #1830006
Resolves: #1830002
Fixes: CVE-2020-12458
Fixes: CVE-2020-12459
2020-05-05 17:28:43 +02:00

24 lines
600 B
Bash
Executable File

#!/bin/bash -eu
[ $# -lt 1 ] && echo "Usage: $0 fedora-version" && exit 1
FEDORA_VERSION="$1"
if [ -d deps ]; then
INSTALL_UNPUBLISHED_DEPENDENCIES=$'COPY deps/ /deps\nRUN cd /deps && dnf -y install *.rpm'
else
INSTALL_UNPUBLISHED_DEPENDENCIES=""
fi
cat <<EOF | podman build -f - .
FROM fedora:${FEDORA_VERSION}
RUN dnf install -y rpkg
RUN mkdir /grafana /deps
${INSTALL_UNPUBLISHED_DEPENDENCIES}
COPY grafana.spec *.patch grafana-*.tar.gz grafana_webpack-*.tar.gz make_grafana_webpack.sh distro-defaults.ini /grafana
WORKDIR /grafana
RUN dnf -y builddep grafana.spec
RUN rpkg local
EOF