mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-10-27 11:53:20 +00:00
35 lines
1.1 KiB
Docker
35 lines
1.1 KiB
Docker
FROM linuxkit/containerd-dev:25522a7fcffd14465d807fadc3d3e4f6da7b10ec as containerd-dev
|
|
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e AS mirror
|
|
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
|
|
# btrfs-progfs is required for btrfs test (mkfs.btrfs)
|
|
# util-linux is required for btrfs test (losetup)
|
|
# xfsprogs is required for xfs test (mkfs.xfs)
|
|
RUN apk add --no-cache --initdb -p /out \
|
|
alpine-baselayout \
|
|
busybox \
|
|
btrfs-progs \
|
|
btrfs-progs-dev \
|
|
gcc \
|
|
git \
|
|
go \
|
|
libc-dev \
|
|
linux-headers \
|
|
make \
|
|
musl \
|
|
util-linux \
|
|
xfsprogs \
|
|
tzdata
|
|
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
|
RUN cp /out/usr/share/zoneinfo/UTC /out/etc/localtime
|
|
|
|
FROM scratch
|
|
COPY --from=mirror /out/ /
|
|
COPY --from=containerd-dev /go/src/github.com/containerd/containerd /go/src/github.com/containerd/containerd/
|
|
|
|
# containerd 1.4.x does not support go modules; remove GO111MODULE=off when we switch to 1.5.x
|
|
ENV GOPATH=/go GO111MODULE=off
|
|
WORKDIR $GOPATH/src/github.com/containerd/containerd
|
|
ADD run.sh ./run.sh
|
|
|
|
ENTRYPOINT ["/bin/sh", "run.sh"]
|