2018-01-29 05:01:05 -06:00
|
|
|
FROM golang:1.9
|
|
|
|
RUN go get -u github.com/golang/dep/cmd/dep
|
|
|
|
WORKDIR $GOPATH/src/github.com/grafana/grafana
|
|
|
|
COPY Gopkg.toml Gopkg.lock ./
|
|
|
|
RUN dep ensure --vendor-only
|
|
|
|
COPY pkg pkg
|
2018-02-06 18:58:37 -06:00
|
|
|
RUN go install -ldflags="-s -w" ./pkg/cmd/grafana-server
|
|
|
|
RUN go install -ldflags="-s -w" ./pkg/cmd/grafana-cli
|
2018-01-29 05:01:05 -06:00
|
|
|
|
|
|
|
FROM node:8
|
|
|
|
WORKDIR /usr/src/app/
|
|
|
|
COPY package.json yarn.lock ./
|
|
|
|
RUN yarn install --frozen-lockfile
|
|
|
|
ENV NODE_ENV production
|
2018-02-06 18:58:37 -06:00
|
|
|
COPY Gruntfile.js tsconfig.json tslint.json ./
|
|
|
|
COPY public public
|
|
|
|
COPY scripts scripts
|
|
|
|
COPY emails emails
|
2018-01-29 05:01:05 -06:00
|
|
|
RUN yarn run build
|
|
|
|
|
|
|
|
FROM debian:stretch-slim
|
|
|
|
WORKDIR /app
|
|
|
|
ENV PATH $PATH:/app/bin
|
2018-02-06 18:58:37 -06:00
|
|
|
COPY --from=0 /go/bin/grafana-server /go/bin/grafana-cli ./bin/
|
2018-01-29 05:01:05 -06:00
|
|
|
COPY --from=1 /usr/src/app/public ./public
|
|
|
|
COPY --from=1 /usr/src/app/tools ./tools
|
|
|
|
COPY conf ./conf
|
|
|
|
CMD ["grafana-server"]
|