Docker: Reduce layers in build container and modified initialization of PATH env in final container (#20132)

Multiple local files copied to same destination in one COPY instruction in 0th build container. PATH env variable is modified using the default PATH env variable available in alpine container to achieve the same effect.
This commit is contained in:
Shubham Bhattar 2019-11-04 18:55:40 +00:00 committed by Marcus Olsson
parent 64bf3b3c04
commit 4424c2f43f

View File

@ -11,8 +11,7 @@ COPY vendor vendor
RUN go mod verify
COPY pkg pkg
COPY build.go build.go
COPY package.json package.json
COPY build.go package.json ./
RUN go run build.go build
@ -52,7 +51,7 @@ LABEL maintainer="Grafana team <hello@grafana.com>"
ARG GF_UID="472"
ARG GF_GID="472"
ENV PATH=/usr/share/grafana/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
ENV PATH="/usr/share/grafana/bin:$PATH" \
GF_PATHS_CONFIG="/etc/grafana/grafana.ini" \
GF_PATHS_DATA="/var/lib/grafana" \
GF_PATHS_HOME="/usr/share/grafana" \