forked from grafana/grafana-docker
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
10 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
FROM appcelerator/alpine:3.6.0 | ||
FROM appcelerator/alpine:3.7.0 | ||
|
||
RUN apk --no-cache upgrade | ||
RUN apk --no-cache add nodejs-current tini@community | ||
RUN apk --no-cache add nodejs fontconfig | ||
|
||
ENV GRAFANA_VERSION 4.6.2 | ||
|
||
ENV GOLANG_VERSION 1.9.2 | ||
ENV GOLANG_SRC_URL https://storage.googleapis.com/golang/go$GOLANG_VERSION.src.tar.gz | ||
ENV GOLANG_SRC_SHA256 665f184bf8ac89986cfd5a4460736976f60b57df6b320ad71ad4cef53bb143dc | ||
|
||
RUN apk update && apk add fontconfig && \ | ||
echo "Installing build dependencies" && \ | ||
apk --virtual build-deps add build-base openssl go git gcc python musl-dev make nodejs-dev fontconfig-dev nodejs-current-npm patch && \ | ||
RUN echo "Installing build dependencies" && \ | ||
apk --virtual build-deps --no-cache add build-base openssl go git gcc python musl-dev make fontconfig-dev nodejs-dev yarn patch && \ | ||
echo "Installing Go" && \ | ||
export GOROOT_BOOTSTRAP="$(go env GOROOT)" && \ | ||
wget -q "$GOLANG_SRC_URL" -O golang.tar.gz && \ | ||
|
@@ -23,27 +22,25 @@ RUN apk update && apk add fontconfig && \ | |
export GOPATH=/go && \ | ||
export PATH=/usr/local/go/bin:$PATH && \ | ||
go version && \ | ||
npm install npm@latest -g && \ | ||
yarn --version && yarn global add npm && \ | ||
npm --version && \ | ||
mkdir -p $GOPATH/src/github.com/grafana && cd $GOPATH/src/github.com/grafana && \ | ||
git clone https://github.com/grafana/grafana.git -b v${GRAFANA_VERSION} &&\ | ||
cd grafana && \ | ||
npm install -g [email protected] && \ | ||
npm install -g [email protected] && \ | ||
yarn global add [email protected] && \ | ||
go run build.go setup && \ | ||
go run build.go build && \ | ||
yarn install --pure-lockfile && \ | ||
npm --version && \ | ||
npm run build && \ | ||
npm uninstall -g yarn && \ | ||
npm uninstall -g grunt-cli && \ | ||
npm cache --force clear && \ | ||
yarn remove grunt-cli && \ | ||
yarn remove npm && \ | ||
mv ./bin/grafana-server ./bin/grafana-cli /bin/ && \ | ||
mkdir -p /etc/grafana/json /var/lib/grafana/plugins /var/log/grafana /usr/share/grafana && \ | ||
mv ./public /usr/share/grafana/public && \ | ||
mv ./conf /usr/share/grafana/conf && \ | ||
echo "Removing build dependencies" && \ | ||
apk del build-deps && cd / && rm -rf /var/cache/apk/* /usr/local/share/.cache $GOPATH /usr/local/go /root/.npm /root/.node-gyp /root/.config /tmp/phantomjs /tmp/*compile-cache* /usr/lib/node_modules/npm | ||
apk del --force build-deps && cd / && rm -rf /usr/local/share/.cache $GOPATH /usr/local/go /root/.npm /root/.node-gyp /root/.config /tmp/phantomjs /tmp/*compile-cache* /usr/lib/node_modules/npm /usr/local/share/.config | ||
|
||
VOLUME ["/var/lib/grafana", "/var/lib/grafana/plugins", "/var/log/grafana"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters