mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-06 06:12:47 +00:00
https://github.com/containerd/containerd/releases/tag/v1.0.2-rc.0 $ git log --oneline --no-merges v1.0.1..v1.0.2-rc.0 a67e9d27 release: prepare 1.0.2-rc.0 91c3b8bf content/testsuite: pass context to hold lease c910b470 content/testsuite: ensure unique content per test 45e7aa52 Update copy to discard over truncate d7a0e702 Add resume content test cases 5c21576e Fix duplicate directories entries on metadata change af4455b3 vendor: update go-runc to reduce gc pressure f042dc58 cmd/containerd-shim: aggressive memory reclamation 8cf32d34 cmd/containerd-shim, reaper: reduce channel allocation 367eddb4 archive, cio, cmd, linux: use buffer pools 852f989a Update runc to 9f9c96235cc97674e935002fc3d78361b69 a03fb1bd Fix NPE in dialer d04746b4 Update metadata image store to be initialized once 5a67161d Update namespace empty check to use buckets Signed-off-by: Ian Campbell <ijc@docker.com>
90 lines
3.3 KiB
Docker
90 lines
3.3 KiB
Docker
FROM alpine:3.7 AS mirror
|
|
|
|
# update base image
|
|
RUN apk update && apk upgrade -a
|
|
|
|
# Copy Dockerfile so we can include it in the hash
|
|
COPY Dockerfile /Dockerfile
|
|
COPY packages* /tmp/
|
|
|
|
# mirror packages
|
|
RUN cat /tmp/packages.$(uname -m) >> /tmp/packages && \
|
|
mkdir -p /mirror/$(uname -m) && \
|
|
apk fetch --recursive -o /mirror/$(uname -m) $(apk info; cat /tmp/packages)
|
|
|
|
# add the tools for WireGuard, since the kernel module is now included, but from edge/testing
|
|
RUN apk fetch --recursive -o /mirror/$(uname -m) -X http://dl-cdn.alpinelinux.org/alpine/edge/testing -U wireguard-tools
|
|
|
|
# install abuild for signing
|
|
RUN apk add --no-cache abuild
|
|
|
|
# install a new key into /etc/apk/keys
|
|
RUN abuild-keygen -a -i -n
|
|
|
|
# index the new repo
|
|
RUN apk index --rewrite-arch $(uname -m) -o /mirror/$(uname -m)/APKINDEX.unsigned.tar.gz /mirror/$(uname -m)/*.apk
|
|
|
|
# sign the index
|
|
RUN cp /mirror/$(uname -m)/APKINDEX.unsigned.tar.gz /mirror/$(uname -m)/APKINDEX.tar.gz
|
|
RUN abuild-sign /mirror/$(uname -m)/APKINDEX.tar.gz
|
|
|
|
# set this as our repo but keep a copy of the upstream for downstream use
|
|
RUN mv /etc/apk/repositories /etc/apk/repositories.upstream && echo "/mirror" > /etc/apk/repositories && apk update
|
|
|
|
# add Go validation tools
|
|
COPY go-compile.sh /go/bin/
|
|
RUN apk add --no-cache git go musl-dev
|
|
ENV GOPATH=/go PATH=$PATH:/go/bin
|
|
RUN go get -u github.com/golang/lint/golint
|
|
RUN go get -u github.com/gordonklaus/ineffassign
|
|
RUN go get -u github.com/LK4D4/vndr
|
|
|
|
# checkout and compile containerd
|
|
# Update `FROM` in `pkg/containerd/Dockerfile`, `pkg/init/Dockerfile` and
|
|
# `test/pkg/containerd/Dockerfile` when changing this.
|
|
ENV CONTAINERD_REPO=https://github.com/containerd/containerd.git
|
|
ENV CONTAINERD_COMMIT=v1.0.2-rc.0
|
|
RUN mkdir -p $GOPATH/src/github.com/containerd && \
|
|
cd $GOPATH/src/github.com/containerd && \
|
|
git clone https://github.com/containerd/containerd.git && \
|
|
cd $GOPATH/src/github.com/containerd/containerd && \
|
|
git checkout $CONTAINERD_COMMIT
|
|
RUN apk add --no-cache btrfs-progs-dev gcc libc-dev linux-headers make
|
|
RUN cd $GOPATH/src/github.com/containerd/containerd && \
|
|
make binaries EXTRA_FLAGS="-buildmode pie" EXTRA_LDFLAGS='-extldflags "-fno-PIC -static"' BUILD_TAGS="static_build"
|
|
|
|
# Checkout and compile iucode-tool for Intel CPU microcode
|
|
# On non-x86_64 create a dummy file to copy below.
|
|
ENV IUCODE_REPO=https://gitlab.com/iucode-tool/iucode-tool
|
|
ENV IUCODE_COMMIT=v2.2
|
|
WORKDIR /
|
|
ADD iucode-tool.patch /
|
|
RUN set -e && \
|
|
mkdir /iucode_tool && \
|
|
if [ $(uname -m) = "x86_64" ]; then \
|
|
apk add --no-cache automake autoconf argp-standalone git gcc make musl-dev patch && \
|
|
git clone ${IUCODE_REPO} && \
|
|
cd /iucode-tool && \
|
|
git checkout ${IUCODE_COMMIT} && \
|
|
patch -p 1 < /iucode-tool.patch && \
|
|
./autogen.sh && \
|
|
./configure && \
|
|
make && \
|
|
cp iucode_tool /iucode_tool; \
|
|
fi
|
|
|
|
FROM alpine:3.7
|
|
|
|
COPY --from=mirror /etc/apk/repositories /etc/apk/repositories
|
|
COPY --from=mirror /etc/apk/repositories.upstream /etc/apk/repositories.upstream
|
|
COPY --from=mirror /etc/apk/keys /etc/apk/keys/
|
|
COPY --from=mirror /mirror /mirror/
|
|
COPY --from=mirror /go/bin /go/bin/
|
|
COPY --from=mirror /Dockerfile /Dockerfile
|
|
COPY --from=mirror /go/src/github.com/containerd/containerd /go/src/github.com/containerd/containerd/
|
|
COPY --from=mirror /iucode_tool /usr/bin/
|
|
|
|
RUN apk update && apk upgrade -a
|
|
|
|
ENV GOPATH=/go PATH=$PATH:/go/bin
|