Commit 0ff54d25 authored by Leonard Gram's avatar Leonard Gram
Browse files

build: makes it easier to build a local docker container.

parent b61ac546
......@@ -58,6 +58,7 @@ debug.test
/examples/*/dist
/packaging/**/*.rpm
/packaging/**/*.deb
/packaging/**/*.tar.gz
# Ignore OSX indexing
.DS_Store
......
......@@ -24,6 +24,12 @@ build-js:
build: build-go build-js
build-docker-dev:
@echo "\033[92mInfo:\033[0m the frontend code is expected to be built already."
go run build.go -goos linux -pkg-arch amd64 ${OPT} build package-only latest
cp dist/grafana-latest.linux-x64.tar.gz packaging/docker
cd packaging/docker && docker build --tag grafana/grafana:dev .
test-go:
go test -v ./pkg/...
......@@ -36,4 +42,4 @@ run:
./bin/grafana-server
protoc:
protoc -I pkg/tsdb/models pkg/tsdb/models/*.proto --go_out=plugins=grpc:pkg/tsdb/models/.
\ No newline at end of file
protoc -I pkg/tsdb/models pkg/tsdb/models/*.proto --go_out=plugins=grpc:pkg/tsdb/models/.
......@@ -12,14 +12,15 @@ 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 ca-certificates && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
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" && \
RUN mkdir -p "$GF_PATHS_HOME/.aws" && \
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 && \
useradd -r -u $GF_UID -g grafana grafana && \
mkdir -p "$GF_PATHS_PROVISIONING/datasources" \
......
Supports Markdown
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