mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-05 23:21:36 +00:00
This is actually containerd#1141 rebased onto v1.0.0-alpha1. The `dist` command has been integreated into `ctr` and so is removed, including from the getty and sshd bind mounts and the test which uses it is updated.. There is no change to the version of runc vendored by containerd, so this is unchanged. Signed-off-by: Ian Campbell <ijc@docker.com>
37 lines
1.1 KiB
Docker
37 lines
1.1 KiB
Docker
FROM linuxkit/alpine:a39a433162a873519910a07beeb3e8db22529956 as alpine
|
|
RUN \
|
|
apk add \
|
|
btrfs-progs-dev \
|
|
gcc \
|
|
git \
|
|
go \
|
|
libc-dev \
|
|
linux-headers \
|
|
make \
|
|
tzdata \
|
|
&& true
|
|
ENV GOPATH=/go PATH=$PATH:/go/bin
|
|
# CONTAINERD_REPO and CONTAINERD_COMMIT are defined in linuxkit/alpine
|
|
RUN mkdir -p $GOPATH/src/github.com/containerd && \
|
|
cd $GOPATH/src/github.com/containerd && \
|
|
git clone $CONTAINERD_REPO
|
|
WORKDIR $GOPATH/src/github.com/containerd/containerd
|
|
RUN git checkout $CONTAINERD_COMMIT
|
|
RUN make binaries EXTRA_FLAGS="-buildmode pie" EXTRA_LDFLAGS="-extldflags \\\"-fno-PIC -static\\\""
|
|
RUN cp bin/containerd bin/ctr bin/containerd-shim /usr/bin/
|
|
|
|
ADD cmd /go/src/cmd
|
|
RUN cd /go/src/cmd/service && ./skanky-vendor.sh $GOPATH/src/github.com/containerd/containerd
|
|
RUN go-compile.sh /go/src/cmd/service
|
|
|
|
WORKDIR /
|
|
COPY . .
|
|
|
|
FROM scratch
|
|
ENTRYPOINT []
|
|
WORKDIR /
|
|
COPY --from=alpine /usr/bin/containerd /usr/bin/ctr /usr/bin/containerd-shim /go/bin/service /usr/bin/
|
|
COPY --from=alpine /etc/containerd/config.toml /etc/containerd/
|
|
COPY --from=alpine /usr/share/zoneinfo/UTC /etc/localtime
|
|
COPY etc etc/
|