mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 10:09:07 +00:00
test-containerd: move git clone into mirror
`${CONTAINERD_COMMIT}` is only defined in the `FROM linuxkit/alpine` section and not the in `FROM scratch` section. This means we were always checking out the current master at the time of build rather than the expected commit because `git checkout $CONTAINERD_COMMIT` was expanding to `git checkout `. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
0635ef9569
commit
b194a96584
@ -19,15 +19,19 @@ RUN apk add --no-cache --initdb -p /out \
|
|||||||
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
||||||
RUN cp /out/usr/share/zoneinfo/UTC /out/etc/localtime
|
RUN cp /out/usr/share/zoneinfo/UTC /out/etc/localtime
|
||||||
|
|
||||||
FROM scratch
|
RUN apk add git
|
||||||
COPY --from=mirror /out/ /
|
ENV GOPATH=/out/go
|
||||||
ENV GOPATH=/go
|
|
||||||
RUN mkdir -p $GOPATH/src/github.com/containerd && \
|
RUN mkdir -p $GOPATH/src/github.com/containerd && \
|
||||||
cd $GOPATH/src/github.com/containerd && \
|
cd $GOPATH/src/github.com/containerd && \
|
||||||
git clone https://github.com/containerd/containerd.git
|
git clone https://github.com/containerd/containerd.git
|
||||||
WORKDIR $GOPATH/src/github.com/containerd/containerd
|
WORKDIR $GOPATH/src/github.com/containerd/containerd
|
||||||
# CONTAINERD_COMMIT is defined in linuxkit/alpine
|
# CONTAINERD_COMMIT is defined in linuxkit/alpine
|
||||||
RUN git checkout $CONTAINERD_COMMIT
|
RUN git checkout $CONTAINERD_COMMIT
|
||||||
|
|
||||||
|
FROM scratch
|
||||||
|
COPY --from=mirror /out/ /
|
||||||
|
ENV GOPATH=/go
|
||||||
|
WORKDIR $GOPATH/src/github.com/containerd/containerd
|
||||||
ADD run.sh ./run.sh
|
ADD run.sh ./run.sh
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/sh", "run.sh"]
|
ENTRYPOINT ["/bin/sh", "run.sh"]
|
||||||
|
Loading…
Reference in New Issue
Block a user