-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for building querytee (#2602)
- Loading branch information
1 parent
19030e6
commit 143672e
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM golang:1.14.2 as build | ||
|
||
ARG TOUCH_PROTOS | ||
COPY . /src/loki | ||
WORKDIR /src/loki | ||
RUN make clean && make BUILD_IN_CONTAINER=false loki-querytee | ||
|
||
FROM alpine:3.9 | ||
RUN apk add --update --no-cache ca-certificates | ||
COPY --from=build /src/loki/cmd/querytee/loki-querytee /usr/bin/querytee | ||
ENTRYPOINT [ "/usr/bin/querytee" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
ARG BUILD_IMAGE=grafana/loki-build-image:0.9.1 | ||
# Directories in this file are referenced from the root of the project not this folder | ||
# This file is intended to be called from the root like so: | ||
# docker build -t grafana/promtail -f cmd/promtail/Dockerfile . | ||
FROM golang:1.11.4-alpine as goenv | ||
RUN go env GOARCH > /goarch && \ | ||
go env GOARM > /goarm | ||
|
||
FROM --platform=linux/amd64 $BUILD_IMAGE as build | ||
COPY --from=goenv /goarch /goarm / | ||
COPY . /src/loki | ||
WORKDIR /src/loki | ||
RUN make clean && GOARCH=$(cat /goarch) GOARM=$(cat /goarm) make BUILD_IN_CONTAINER=false loki-querytee | ||
|
||
FROM alpine:3.9 | ||
RUN apk add --update --no-cache ca-certificates | ||
COPY --from=build /src/loki/cmd/querytee/querytee /usr/bin/querytee | ||
ENTRYPOINT [ "/usr/bin/querytee" ] |