1234567891011121314151617 |
- FROM golang:alpine AS build
-
- WORKDIR /usr/local/go/src/github.com/google/mtail
-
- RUN apk add build-base git \
- && git clone https://github.com/google/mtail . \
- && make install_deps \
- && CGO_ENABLED=0 GOOS=linux go build -o /usr/bin/mtail -a -ldflags '-extldflags "-static"' ./cmd/mtail \
- && mkdir /tmp/empty
-
- FROM scratch
-
- COPY --from=build /usr/bin/mtail /mtail
- COPY --from=build /tmp/empty /tmp
-
- EXPOSE 3903
- ENTRYPOINT ["/mtail", "-logtostderr"]
|