forked from facette/facette
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
54 lines (39 loc) · 1.64 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM debian:jessie-slim
MAINTAINER Development Team <[email protected]>
ENV GO_VERSION=1.8.3 NODE_VERSION=7.10.0 PREFIX=/usr BUILD_TAGS=builtin_assets
RUN echo "deb http://deb.debian.org/debian jessie-backports main" >>/etc/apt/sources.list && \
apt-get update && \
apt-get install --no-install-recommends -y -t jessie-backports \
build-essential \
ca-certificates \
curl \
git \
librrd-dev \
pandoc \
xz-utils && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/usr/local/node/bin
RUN curl -s -L https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz | \
tar -C /usr/local -xvzf - && \
go get -u github.com/jteeuwen/go-bindata/... && cp ~/go/bin/* /usr/local/bin
RUN curl -s -L https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz | \
tar -C /usr/local --transform "flags=r;s/^node-v${NODE_VERSION}-linux-x64/node/" -xvJf -
COPY . /facette
WORKDIR /facette
RUN make && \
make install && \
install -D docs/examples/facette.yaml /etc/facette/facette.yaml && \
useradd -r -m -u 12003 -s /usr/sbin/nologin -d /var/lib/facette facette && \
sed -i -r \
-e 's/listen: localhost:12003/listen: :12003/' \
-e 's/path: data.db/path: \/var\/lib\/facette\/data.db/' \
-e 's/assets_dir: assets/assets_dir: \/usr\/share\/facette\/assets/' \
/etc/facette/facette.yaml && \
rm -rf /facette
WORKDIR /
VOLUME /var/lib/facette
EXPOSE 12003
USER 12003
ENTRYPOINT ["facette"]
# vim: ts=4 sw=4 et