Commit e3a90721 by Leonard Gram

build: builds docker image from local grafna tgz.

parent bfe41d3c
......@@ -190,6 +190,7 @@ jobs:
- setup_remote_docker
- run: docker info
- run: echo $GRAFANA_VERSION
- run: cp dist/grafana-latest.linux-x64.tar.gz packaging/docker
- run: cd packaging/docker && ./build.sh ${GRAFANA_VERSION}
build-enterprise:
......
FROM debian:stretch-slim
ARG GRAFANA_URL="https://s3-us-west-2.amazonaws.com/grafana-releases/master/grafana-latest.linux-x64.tar.gz"
ARG GRAFANA_TGZ="grafana-latest.linux-x64.tar.gz"
ARG GF_UID="472"
ARG GF_GID="472"
......@@ -12,9 +12,12 @@ ENV PATH=/usr/share/grafana/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bi
GF_PATHS_PLUGINS="/var/lib/grafana/plugins" \
GF_PATHS_PROVISIONING="/etc/grafana/provisioning"
RUN apt-get update && apt-get install -qq -y tar libfontconfig curl ca-certificates && \
COPY ${GRAFANA_TGZ} /tmp/grafana.tar.gz
RUN apt-get update && apt-get install -qq -y tar libfontconfig ca-certificates && \
mkdir -p "$GF_PATHS_HOME/.aws" && \
curl "$GRAFANA_URL" | tar xfvz - --strip-components=1 -C "$GF_PATHS_HOME" && \
tar xfvz /tmp/grafana.tar.gz --strip-components=1 -C "$GF_PATHS_HOME" && \
rm /tmp/grafana.tar.gz && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* && \
groupadd -r -g $GF_GID grafana && \
......@@ -35,4 +38,4 @@ COPY ./run.sh /run.sh
USER grafana
WORKDIR /
ENTRYPOINT [ "/run.sh" ]
\ No newline at end of file
ENTRYPOINT [ "/run.sh" ]
......@@ -10,7 +10,6 @@ echo ${_grafana_version}
if [ "$_grafana_version" != "" ]; then
echo "Building version ${_grafana_version}"
docker build \
--build-arg GRAFANA_URL="https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-${_grafana_version}.linux-amd64.tar.gz" \
--tag "${_docker_repo}:${_grafana_version}" \
--no-cache=true .
docker tag ${_docker_repo}:${_grafana_version} ${_docker_repo}:latest
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment