Files
linuxkit/pkg/init-lcow/Dockerfile
Ian Campbell 29fc12607f Update various other go base pkgs to newer alpine (go1.9)
These are those which set $GOPATH but don't use go-compile.sh.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-12 16:50:47 +01:00

33 lines
1.2 KiB
Docker

FROM linuxkit/alpine:6211ec0252873c9ff9604101fb256353f5a3832a 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 \
e2fsprogs \
musl
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
FROM linuxkit/alpine:6211ec0252873c9ff9604101fb256353f5a3832a AS build
ENV OPENGCS_REPO=https://github.com/Microsoft/opengcs
ENV OPENGCS_COMMIT=48ae4e3ba3d2fea746fb4dc20a72832a46f45466
RUN apk add --no-cache build-base curl git go musl-dev
ENV GOPATH=/go PATH=$PATH:/go/bin
RUN git clone $OPENGCS_REPO /go/src/github.com/Microsoft/opengcs && \
cd /go/src/github.com/Microsoft/opengcs && \
git checkout $OPENGCS_COMMIT && \
cd service && \
make
RUN mkdir /out && \
cp -r /go/src/github.com/Microsoft/opengcs/service/bin /out/bin && \
mkdir /out/sbin && \
curl -fSL "https://raw.githubusercontent.com/mirror/busybox/38d966943f5288bb1f2e7219f50a92753c730b14/examples/udhcp/simple.script" -o /out/sbin/udhcpc_config.script && \
chmod ugo+rx /out/sbin/udhcpc_config.script
FROM scratch
ENTRYPOINT []
CMD []
WORKDIR /
COPY --from=mirror /out/ /
COPY --from=build /out/ /
COPY init /