github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/cmd/querytee/Dockerfile.cross (about)

     1  ARG BUILD_IMAGE=grafana/loki-build-image:0.18.0
     2  # Directories in this file are referenced from the root of the project not this folder
     3  # This file is intended to be called from the root like so:
     4  # docker build -t grafana/promtail -f cmd/promtail/Dockerfile .
     5  FROM golang:1.18.4-alpine as goenv
     6  RUN go env GOARCH > /goarch && \
     7    go env GOARM > /goarm
     8  
     9  FROM --platform=linux/amd64 $BUILD_IMAGE as build
    10  COPY --from=goenv /goarch /goarm /
    11  COPY . /src/loki
    12  WORKDIR /src/loki
    13  RUN make clean && GOARCH=$(cat /goarch) GOARM=$(cat /goarm) make BUILD_IN_CONTAINER=false loki-querytee
    14  
    15  FROM alpine:3.15.4
    16  RUN apk add --update --no-cache ca-certificates
    17  COPY --from=build /src/loki/cmd/querytee/querytee /usr/bin/querytee
    18  ENTRYPOINT [ "/usr/bin/querytee" ]