-
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.
- Loading branch information
Showing
2 changed files
with
11 additions
and
6 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 |
---|---|---|
@@ -1,14 +1,17 @@ | ||
# Directories in this file are referenced from the root of the project not this folder | ||
# This file is intented 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 grafana/loki-build-image:0.2.1 as build | ||
ARG GOARCH="amd64" | ||
FROM --platform=linux/amd64 grafana/loki-build-image as build | ||
COPY --from=goenv /goarch /goarm / | ||
COPY . /go/src/github.com/grafana/loki | ||
WORKDIR /go/src/github.com/grafana/loki | ||
RUN make clean && make loki-canary | ||
RUN GOARCH=$(cat /goarch) GOARM=$(cat /goarm) make clean && make loki-canary | ||
|
||
FROM alpine:3.9 | ||
RUN apk add --update --no-cache ca-certificates | ||
COPY --from=build /go/src/github.com/grafana/loki/cmd/loki-canary/loki-canary /usr/bin/loki-canary | ||
FROM alpine:3.9 | ||
RUN apk add --update --no-cache ca-certificates | ||
COPY --from=build /go/src/github.com/grafana/loki/cmd/loki-canary/loki-canary /usr/bin/loki-canary | ||
ENTRYPOINT [ "/usr/bin/loki-canary" ] |