Files
linuxkit/pkg/rngd/Dockerfile
Justin Cormack e0bc13451f Replace rngd with a Go version
Only supports the use cases we currently need, currently support
for using Intel hardware rng to initialise and add entropy.

Supports oneshot and service mode. Call as `rngd -1` for one shot
mode.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-31 20:16:26 +01:00

16 lines
480 B
Docker

FROM linuxkit/alpine:c23813875499d85163dc358fc6370c9de650df57 AS mirror
RUN apk add --no-cache go gcc musl-dev linux-headers
ENV GOPATH=/go PATH=$PATH:/go/bin
COPY cmd/rngd/*.go /go/src/rngd/
RUN REQUIRE_CGO=1 go-compile.sh /go/src/rngd
FROM scratch
ENTRYPOINT []
CMD []
WORKDIR /
COPY --from=mirror /go/bin/rngd /sbin/rngd
CMD ["/sbin/rngd"]
LABEL org.mobyproject.config='{"capabilities": ["CAP_SYS_ADMIN"], "oomScoreAdj": -800, "readonly": true, "net": "new", "ipc": "new"}'