Files
linuxkit/pkg/containerd/Dockerfile
Rolf Neugebauer c1a873b489 pkg: Update most packages to new alpine base
Also make the HUB org/registry build time configurable
for these packages.

Others will be reworked in sub sequent commits.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-18 18:55:22 +01:00

29 lines
948 B
Docker

FROM linuxkit/alpine:6336329f15b4166514782eaa555cf0ffd35c519c@sha256:f6c2ce92910b1d6e4e5557850a554f4a3ae9f66c1e89ad86a24d6c6e550f165e as alpine
RUN \
apk add \
btrfs-progs-dev \
gcc \
git \
go \
libc-dev \
linux-headers \
make \
&& true
ENV GOPATH=/root/go
ENV CONTAINERD_COMMIT=b53105ed253b99f8b63809e704f23819dce9776e
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
RUN git checkout $CONTAINERD_COMMIT
RUN make binaries GO_GCFLAGS="-buildmode pie --ldflags '-extldflags \"-fno-PIC -static\"'"
RUN cp bin/containerd bin/ctr bin/containerd-shim bin/dist /usr/bin/
WORKDIR /
COPY . .
FROM scratch
ENTRYPOINT []
WORKDIR /
COPY --from=alpine /usr/bin/containerd /usr/bin/ctr /usr/bin/containerd-shim /usr/bin/
COPY --from=alpine /etc/containerd/config.toml /etc/containerd/