mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
More efficient builds and some fixes to the Go binaries
This commit is contained in:
parent
a5d1fb7e56
commit
c89f21ba29
14
Dockerfile
14
Dockerfile
@ -4,24 +4,24 @@ WORKDIR $GOPATH/src/github.com/grafana/grafana
|
|||||||
COPY Gopkg.toml Gopkg.lock ./
|
COPY Gopkg.toml Gopkg.lock ./
|
||||||
RUN dep ensure --vendor-only
|
RUN dep ensure --vendor-only
|
||||||
COPY pkg pkg
|
COPY pkg pkg
|
||||||
RUN go install ./pkg/cmd/grafana-server
|
RUN go install -ldflags="-s -w" ./pkg/cmd/grafana-server
|
||||||
RUN go install ./pkg/cmd/grafana-cli
|
RUN go install -ldflags="-s -w" ./pkg/cmd/grafana-cli
|
||||||
RUN strip $GOPATH/bin/grafana-server
|
|
||||||
RUN strip $GOPATH/bin/grafana-cli
|
|
||||||
|
|
||||||
FROM node:8
|
FROM node:8
|
||||||
WORKDIR /usr/src/app/
|
WORKDIR /usr/src/app/
|
||||||
COPY package.json yarn.lock ./
|
COPY package.json yarn.lock ./
|
||||||
RUN yarn install --frozen-lockfile
|
RUN yarn install --frozen-lockfile
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
COPY . ./
|
COPY Gruntfile.js tsconfig.json tslint.json ./
|
||||||
|
COPY public public
|
||||||
|
COPY scripts scripts
|
||||||
|
COPY emails emails
|
||||||
RUN yarn run build
|
RUN yarn run build
|
||||||
|
|
||||||
FROM debian:stretch-slim
|
FROM debian:stretch-slim
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV PATH $PATH:/app/bin
|
ENV PATH $PATH:/app/bin
|
||||||
COPY --from=0 /go/bin/grafana-server ./bin/
|
COPY --from=0 /go/bin/grafana-server /go/bin/grafana-cli ./bin/
|
||||||
COPY --from=0 /go/bin/grafana-cli ./bin/
|
|
||||||
COPY --from=1 /usr/src/app/public ./public
|
COPY --from=1 /usr/src/app/public ./public
|
||||||
COPY --from=1 /usr/src/app/tools ./tools
|
COPY --from=1 /usr/src/app/tools ./tools
|
||||||
COPY conf ./conf
|
COPY conf ./conf
|
||||||
|
Loading…
Reference in New Issue
Block a user