mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-25 06:12:42 +00:00
This is an example external logging service which can be enabled by
adding it to the `init` section of the .yml, for example:
...
init:
- linuxkit/init:35866bb276c264a5f664bfac7456f4b9eeb87a4d
- linuxkit/runc:v0.4
- linuxkit/containerd:f2bc1bda1ab18146967fa1a149800aaf14bee81b
- linuxkit/ca-certificates:v0.4
- linuxkit/memlogd:cc035e5c9e4011ec1ba97a181a6689fc90965ce9
onboot:
...
Signed-off-by: David Scott <dave.scott@docker.com>
20 lines
503 B
Docker
20 lines
503 B
Docker
FROM linuxkit/alpine:1b05307ae8152e3d38f79e297b0632697a30c65c AS build
|
|
|
|
RUN apk add --no-cache go musl-dev
|
|
ENV GOPATH=/go PATH=$PATH:/go/bin
|
|
|
|
COPY cmd/ /go/src/
|
|
RUN go-compile.sh /go/src/memlogd
|
|
RUN go-compile.sh /go/src/logread
|
|
RUN go-compile.sh /go/src/logwrite
|
|
|
|
FROM scratch
|
|
ENTRYPOINT []
|
|
CMD []
|
|
WORKDIR /
|
|
COPY --from=build /go/bin/memlogd usr/bin/memlogd
|
|
COPY --from=build /go/bin/logread usr/bin/logread
|
|
COPY --from=build /go/bin/logwrite usr/bin/logwrite
|
|
# We'll start from init.d
|
|
COPY etc/ /etc/
|