Skip to content

Commit

Permalink
Build process cleanup
Browse files Browse the repository at this point in the history
* Less layers: 12 -> 8
* Explicit version in Dockerfile
* No need to disable cache on build since version env invalidates cache
* HTTPS URL for download
* Using jessie instead of wheezy
* Cleaning up build deps and debian lists

With all these changes it is possible to use automated build on docker hub.
  • Loading branch information
bobrik committed Oct 4, 2015
1 parent d4150a8 commit 56fa38e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
21 changes: 10 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
FROM debian:wheezy
FROM debian:jessie

RUN apt-get update && apt-get -y install libfontconfig wget adduser openssl ca-certificates && apt-get clean
ENV GRAFANA_VERSION 2.1.3

RUN wget http://grafanarel.s3.amazonaws.com/builds/grafana_latest_amd64.deb
RUN apt-get update && \
apt-get -y install libfontconfig wget adduser openssl ca-certificates && \
apt-get clean && \
wget https://grafanarel.s3.amazonaws.com/builds/grafana_${GRAFANA_VERSION}_amd64.deb -O /tmp/grafana.deb && \
dpkg -i /tmp/grafana.deb && \
rm /tmp/grafana.deb

RUN dpkg -i grafana_latest_amd64.deb
VOLUME ["/var/lib/grafana", "/var/log/grafana", "/etc/grafana"]

EXPOSE 3000

VOLUME ["/var/lib/grafana"]
VOLUME ["/var/log/grafana"]
VOLUME ["/etc/grafana"]

WORKDIR /usr/share/grafana

ENTRYPOINT ["/usr/sbin/grafana-server", "--config=/etc/grafana/grafana.ini", "cfg:default.paths.data=/var/lib/grafana", "cfg:default.paths.logs=/var/log/grafana"]
ENTRYPOINT ["/usr/sbin/grafana-server", "--homepath=/usr/share/grafana", "--config=/etc/grafana/grafana.ini", "cfg:default.paths.data=/var/lib/grafana", "cfg:default.paths.logs=/var/log/grafana"]
6 changes: 0 additions & 6 deletions build.sh

This file was deleted.

0 comments on commit 56fa38e

Please sign in to comment.