Last active
December 17, 2019 09:42
-
-
Save hyperized/47b7810a82ce34b1e88dd83e41c71e4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Loosely based on: https://github.com/linuxkit/linuxkit/blob/master/pkg/runc/Dockerfile | |
FROM linuxkit/alpine:86cd4f51b49fb9a078b50201d892a3c7973d48ec as alpine | |
ENV GOPATH=/go | |
ENV PATH=$PATH:/go/bin | |
ENV runc_version "v1.0.0-rc9" | |
RUN \ | |
apk add \ | |
bash \ | |
gcc \ | |
git \ | |
go \ | |
libc-dev \ | |
libseccomp-dev \ | |
linux-headers \ | |
make | |
RUN mkdir -p $GOPATH/src/github.com/opencontainers | |
WORKDIR cd $GOPATH/src/github.com/opencontainers | |
RUN git clone --depth=1 --branch=$runc_version https://github.com/opencontainers/runc.git $GOPATH/src/github.com/opencontainers/runc | |
WORKDIR $GOPATH/src/github.com/opencontainers/runc | |
RUN make static | |
RUN cp runc /usr/bin/ | |
RUN mkdir -p /etc/init.d && ln -s /usr/bin/service /etc/init.d/010-onboot | |
RUN mkdir -p /etc/shutdown.d && ln -s /usr/bin/service /etc/shutdown.d/010-onshutdown | |
FROM scratch | |
WORKDIR / | |
ENTRYPOINT [] | |
COPY --from=alpine /usr/bin/runc /usr/bin/ | |
COPY --from=alpine /etc/init.d/ /etc/init.d/ | |
COPY --from=alpine /etc/shutdown.d/ /etc/shutdown.d/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment