mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-08-31 14:39:03 +00:00
27 lines
652 B
Docker
27 lines
652 B
Docker
FROM linuxkit/alpine:1b05307ae8152e3d38f79e297b0632697a30c65c AS mirror
|
|
|
|
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
|
|
RUN apk add --no-cache --initdb -p /out \
|
|
alpine-baselayout \
|
|
busybox \
|
|
musl \
|
|
sfdisk \
|
|
&& true
|
|
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
|
|
|
FROM linuxkit/alpine:1b05307ae8152e3d38f79e297b0632697a30c65c AS build
|
|
|
|
RUN apk add --no-cache go musl-dev
|
|
ENV GOPATH=/go PATH=$PATH:/go/bin
|
|
|
|
COPY *.go /go/src/mountie/
|
|
RUN go-compile.sh /go/src/mountie
|
|
|
|
FROM scratch
|
|
ENTRYPOINT []
|
|
CMD []
|
|
WORKDIR /
|
|
COPY --from=mirror /out/ /
|
|
COPY --from=build /go/bin/mountie usr/bin/mountie
|
|
CMD ["/usr/bin/mountie"]
|