mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-03 19:08:15 +00:00
This process connects to memlogd and streams logs to individual files, one per log. It keeps track of how many bytes have been written to each file and rotates when the file size exceeds a defined threshold. By default the maximum size of each file before rotation is 1MiB and we keep up to 10 files per log. Signed-off-by: David Scott <dave.scott@docker.com>
15 lines
335 B
Docker
15 lines
335 B
Docker
FROM linuxkit/alpine:6264e5b39af8eb1da7ffa4c05a7ccc597da01197 AS build
|
|
|
|
RUN apk add --no-cache go musl-dev
|
|
ENV GOPATH=/go PATH=$PATH:/go/bin
|
|
|
|
COPY logwrite.go /go/src/logwrite/
|
|
RUN go-compile.sh /go/src/logwrite
|
|
|
|
FROM scratch
|
|
ENTRYPOINT []
|
|
CMD []
|
|
WORKDIR /
|
|
COPY --from=build /go/bin/logwrite usr/bin/logwrite
|
|
CMD ["/usr/bin/logwrite"]
|