@@ -13,13 +13,14 @@ RUN \
1313 && true
1414ENV GOPATH=/go PATH=$PATH:/go/bin
1515
16- ENV CRI_CONTAINERD_URL https://github.com/kubernetes-incubator /cri-containerd.git
16+ ENV CRI_CONTAINERD_URL https://github.com/containerd /cri-containerd.git
1717# ENV CRI_CONTAINERD_BRANCH pull/NNN/head
18- ENV CRI_CONTAINERD_COMMIT v1.0.0-beta.1
19- RUN mkdir -p $GOPATH/src/github.com/kubernetes-incubator && \
20- cd $GOPATH/src/github.com/kubernetes-incubator && \
18+ # This is the `standalone-cri-containerd` branch, which is at the point right before standalone mode was deleted.
19+ ENV CRI_CONTAINERD_COMMIT 64b098a293831f742aeb3dd3e48a5405990c14c5
20+ RUN mkdir -p $GOPATH/src/github.com/containerd && \
21+ cd $GOPATH/src/github.com/containerd && \
2122 git clone $CRI_CONTAINERD_URL cri-containerd
22- WORKDIR $GOPATH/src/github.com/kubernetes-incubator /cri-containerd
23+ WORKDIR $GOPATH/src/github.com/containerd /cri-containerd
2324RUN set -e; \
2425 if [ -n "$CRI_CONTAINERD_BRANCH" ] ; then \
2526 git fetch origin "$CRI_CONTAINERD_BRANCH" ; \
@@ -31,7 +32,7 @@ RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
3132# util-linux because a full ns-enter is required.
3233# example commands: /usr/bin/nsenter --net= -F -- <ip commandline>
3334# /usr/bin/nsenter --net=/var/run/netns/cni-5e8acebe-810d-c1b9-ced0-47be2f312fa8 -F -- <ip commandline>
34- # NB the first ("--net=") is actually not valid -- see https://github.com/kubernetes-incubator /cri-containerd /issues/245
35+ # NB the first ("--net=") is actually not valid -- see https://github.com/containerd /cri/issues/245
3536RUN apk add --no-cache --initdb -p /out \
3637 alpine-baselayout \
3738 busybox \
@@ -47,5 +48,7 @@ RUN make DESTDIR=/out install
4748
4849FROM scratch
4950WORKDIR /
50- ENTRYPOINT ["cri-containerd" , "-v" , "2" , "--alsologtostderr" , "--network-bin-dir" , "/opt/cni/bin" , "--network-conf-dir" , "/etc/cni/net.d" ]
51+ # `rootfsPropagation: shared` (used in `build.yml`) appears to be broken at the moment, workaround that issue here.
52+ # ENTRYPOINT ["cri-containerd", "--log-level", "info", "--network-bin-dir", "/opt/cni/bin", "--network-conf-dir", "/etc/cni/net.d"]
53+ ENTRYPOINT ["/bin/sh" , "-c" , "set -ex; mount --make-shared / && exec cri-containerd --log-level info --network-bin-dir /opt/cni/bin --network-conf-dir /etc/cni/net.d" ]
5154COPY --from=build /out /
0 commit comments