Dockerfile 753 B

12345678910111213141516171819202122232425262728
  1. FROM golang:1.9
  2. RUN go get -u github.com/golang/dep/cmd/dep
  3. WORKDIR $GOPATH/src/github.com/grafana/grafana
  4. COPY Gopkg.toml Gopkg.lock ./
  5. RUN dep ensure --vendor-only
  6. COPY pkg pkg
  7. RUN go install ./pkg/cmd/grafana-server
  8. RUN go install ./pkg/cmd/grafana-cli
  9. RUN strip $GOPATH/bin/grafana-server
  10. RUN strip $GOPATH/bin/grafana-cli
  11. FROM node:8
  12. WORKDIR /usr/src/app/
  13. COPY package.json yarn.lock ./
  14. RUN yarn install --frozen-lockfile
  15. ENV NODE_ENV production
  16. COPY . ./
  17. RUN yarn run build
  18. FROM debian:stretch-slim
  19. WORKDIR /app
  20. ENV PATH $PATH:/app/bin
  21. COPY --from=0 /go/bin/grafana-server ./bin/
  22. COPY --from=0 /go/bin/grafana-cli ./bin/
  23. COPY --from=1 /usr/src/app/public ./public
  24. COPY --from=1 /usr/src/app/tools ./tools
  25. COPY conf ./conf
  26. CMD ["grafana-server"]