From c89f21ba2951071c4cf539269391bc7199035099 Mon Sep 17 00:00:00 2001 From: Lorenz Brun Date: Wed, 7 Feb 2018 01:58:37 +0100 Subject: [PATCH] More efficient builds and some fixes to the Go binaries --- Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7b8402bfe9c..9a15b4974f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,24 +4,24 @@ WORKDIR $GOPATH/src/github.com/grafana/grafana COPY Gopkg.toml Gopkg.lock ./ RUN dep ensure --vendor-only COPY pkg pkg -RUN go install ./pkg/cmd/grafana-server -RUN go install ./pkg/cmd/grafana-cli -RUN strip $GOPATH/bin/grafana-server -RUN strip $GOPATH/bin/grafana-cli +RUN go install -ldflags="-s -w" ./pkg/cmd/grafana-server +RUN go install -ldflags="-s -w" ./pkg/cmd/grafana-cli FROM node:8 WORKDIR /usr/src/app/ COPY package.json yarn.lock ./ RUN yarn install --frozen-lockfile 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 FROM debian:stretch-slim WORKDIR /app ENV PATH $PATH:/app/bin -COPY --from=0 /go/bin/grafana-server ./bin/ -COPY --from=0 /go/bin/grafana-cli ./bin/ +COPY --from=0 /go/bin/grafana-server /go/bin/grafana-cli ./bin/ COPY --from=1 /usr/src/app/public ./public COPY --from=1 /usr/src/app/tools ./tools COPY conf ./conf