mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-26 18:54:45 +00:00
containerd/ctr includes this in the default set of bind mounts for a container. Signed-off-by: Ian Campbell <ian.campbell@docker.com>
36 lines
1.1 KiB
Docker
36 lines
1.1 KiB
Docker
FROM linuxkit/alpine:c96f56ef989ccb31fd115d25c1b90f05b992271d 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
|
|
RUN mkdir -p $GOPATH/src/github.com/containerd && \
|
|
cd $GOPATH/src/github.com/containerd && \
|
|
git clone https://github.com/containerd/containerd.git
|
|
WORKDIR $GOPATH/src/github.com/containerd/containerd
|
|
# CONTAINERD_COMMIT is defined in linuxkit/alpine
|
|
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 bin/dist /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/dist /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
|