Files
linuxkit/pkg/metadata/Dockerfile
Rolf Neugebauer f021bb8aaa pkg: In the metadata package, don't error if a dir exists
Use os.Mkdirall() instead of os.Mkdir() as it does not
error if the path already exists.

This enables specifying a default config file with the image
and then over writing it with metadata.

While at it, also update to the latest alpine base image.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-07 18:29:02 +01:00

16 lines
474 B
Docker

FROM linuxkit/alpine:2e362f4459ba4491655061cccdd2fcc7a2de5eb3 AS mirror
RUN apk add --no-cache go musl-dev
ENV GOPATH=/go PATH=$PATH:/go/bin
COPY . /go/src/metadata/
RUN go-compile.sh /go/src/metadata
FROM scratch
ENTRYPOINT []
CMD []
WORKDIR /
COPY --from=mirror /go/bin/metadata /usr/bin/metadata
CMD ["/usr/bin/metadata"]
LABEL org.mobyproject.config='{"binds": ["/dev:/dev", "/var:/var", "/tmp/etc/resolv.conf:/etc/resolv.conf"], "capabilities": ["CAP_SYS_ADMIN"]}'