anchor.diff:        org.label-schema.description="Grafana" \
         org.label-schema.version="${grafana_ver}" \
         org.label-schema.docker.cmd="docker run -d -p 3000:3000 -v data:/var/lib/grafana -v log:/var/log/grafana tcjennings/rpi-grafana" \
  -      org.label-schema.build-date="2018-01-21" \
  +      org.label-schema.build-date="2018-03-19" \
         com.tobyjennings.base-image="resin/rpi-raspbian:jessie" \
         com.tobyjennings.architecture="arm6hf"
   
  
positive.code:         && mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
  
  ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
  
  ARG grafana_ver=4.6.3
  
  ENV NODE=/usr/local/bin/node
  ENV NPM=/usr/local/bin/npm
  
  WORKDIR $GOPATH
  
  RUN go get -d github.com/grafana/grafana \
   || cd $GOPATH/src/github.com/grafana/grafana \
   && git checkout v${grafana_ver}
  
negative.code: ARG node_version=9.8.0
  ARG node_architecture=armv7l
  
  FROM resin/rpi-raspbian:latest as builder
  
  RUN buildDeps='curl gcc g++ git libsqlite3-0 libfontconfig1 libicu52 python2.7 make ruby ruby-dev adduser' \
  	&& set -x \
  	&& apt-get update && apt-get install -y $buildDeps \
          && ln -s /usr/bin/python2.7 /usr/bin/python2 \
          && gem install fpm \
  	&& rm -rf /var/lib/apt/lists/*
  
  ARG node_version=9.8.0
  ARG node_architecture=armv7l
  RUN set -x \
   && curl -Lk https://nodejs.org/dist/v${node_version}/node-v${node_version}-linux-${node_architecture}.tar.xz \
    | tar -xJvf - --strip-components=1 -C /usr/local/
  
  RUN curl -Lk https://raw.githubusercontent.com/timstanley1985/phantomjs-linux-armv6l/master/phantomjs-2.1.1-linux-armv6l.tar.gz \
    | tar xzf - -C /usr/local --strip-components=1 --no-same-permissions --no-same-owner
  
  ENV GOROOT /usr/local/go
  