Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Able to build for ARM #8

Merged
merged 1 commit into from
Apr 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
FROM debian:jessie
MAINTAINER Jan Garaj [email protected]

ARG GRAFANA_ARCHITECTURE=amd64
ARG GRAFANA_VERSION=5.0.4
ARG GRAFANA_DEB_URL=https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_${GRAFANA_VERSION}_${GRAFANA_ARCHITECTURE}.deb
ARG GOSU_BIN_URL=https://github.com/tianon/gosu/releases/download/1.10/gosu-${GRAFANA_ARCHITECTURE}

### GRAFANA_VERSION=latest = nightly build
ENV \
GRAFANA_VERSION=5.0.3 \
GRAFANA_ARCHITECTURE=${GRAFANA_ARCHITECTURE} \
GRAFANA_VERSION=${GRAFANA_VERSION} \
GRAFANA_DEB_URL=${GRAFANA_DEB_URL} \
GOSU_BIN_URL=${GOSU_BIN_URL} \
GF_PLUGIN_DIR=/grafana-plugins \
GF_PATHS_LOGS=/var/log/grafana \
GF_PATHS_DATA=/var/lib/grafana \
Expand All @@ -14,10 +22,10 @@ COPY ./run.sh /run.sh
RUN \
apt-get update && \
apt-get -y --force-yes --no-install-recommends install libfontconfig curl ca-certificates git jq && \
curl https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_${GRAFANA_VERSION}_amd64.deb > /tmp/grafana.deb && \
curl -L ${GRAFANA_DEB_URL} > /tmp/grafana.deb && \
dpkg -i /tmp/grafana.deb && \
rm -f /tmp/grafana.deb && \
curl -L https://github.com/tianon/gosu/releases/download/1.10/gosu-amd64 > /usr/sbin/gosu && \
curl -L ${GOSU_BIN_URL} > /usr/sbin/gosu && \
chmod +x /usr/sbin/gosu && \
for plugin in $(curl -s https://grafana.net/api/plugins?orderBy=name | jq '.items[] | select(.internal=='false') | .slug' | tr -d '"'); do grafana-cli --pluginsDir "${GF_PLUGIN_DIR}" plugins install $plugin; done && \
### branding && \
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,23 @@ Try it out, default admin user is admin/admin.
--name grafana-xxl \
monitoringartist/grafana-xxl:dev

## Building Grafana XXL for ARM

You need ARM-version Grafana's deb (for example from [here](https://github.com/fg2it/grafana-on-raspberry/releases)).
Also you need ARM-version of gosu (from [here](https://github.com/tianon/gosu/releases))

# armhf
docker build \
--tag grafana-xxl \
--build-arg GRAFANA_DEB_URL=https://github.com/fg2it/grafana-on-raspberry/releases/download/v5.0.4/grafana_5.0.4_armhf.deb \
--build-arg GOSU_BIN_URL=https://github.com/tianon/gosu/releases/download/1.10/gosu-armhf .

# arm64
docker build \
--tag grafana-xxl \
--build-arg GRAFANA_DEB_URL=https://github.com/fg2it/grafana-on-raspberry/releases/download/v5.0.4/grafana_5.0.4_arm64.deb \
--build-arg GOSU_BIN_URL=https://github.com/tianon/gosu/releases/download/1.10/gosu-arm64 .

## Configuring your Grafana container

All options defined in conf/grafana.ini can be overriden using environment
Expand Down