Dockerised version of Google's mtail
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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