Files
linuxkit/pkg/metadata/Dockerfile
2021-04-28 09:13:18 +03:00

20 lines
584 B
Docker

FROM linuxkit/alpine:0c069d0fd7defddb6e03925fcd4915407db0c9e1 AS mirror
RUN apk add --no-cache go musl-dev linux-headers
ENV GOPATH=/go PATH=$PATH:/go/bin GO111MODULE=off
# Hack to work around an issue with go on arm64 requiring gcc
RUN [ $(uname -m) = aarch64 ] && apk add --no-cache gcc || true
COPY . /go/src/metadata/
RUN go-compile.sh /go/src/metadata
RUN mkdir -p out/tmp out/var out/run out/dev out/etc out/etc/ssl/certs
FROM scratch
ENTRYPOINT []
CMD []
WORKDIR /
COPY --from=mirror /go/bin/metadata /usr/bin/metadata
COPY --from=mirror /out/ /
CMD ["/usr/bin/metadata"]