Skip to content

Commit

Permalink
alpine 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
ndegory committed Dec 4, 2017
1 parent 0e7d637 commit 1e935ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
21 changes: 9 additions & 12 deletions Dockerfile
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 && \
Expand All @@ -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"]

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ The archive should contain under a top directory at least one of these directori
- ```grafana-4.3```, ```grafana-4.3.2```
- ```grafana-4.4```, ```grafana-4.4.3```
- ```grafana-4.5```, ```grafana-4.5.2```
- ```grafana-4.6```, ```grafana-4.6.2```, ```latest```
- ```grafana-4.6```, ```4.6.2```, ```latest```

0 comments on commit 1e935ee

Please sign in to comment.