mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-10-29 04:31:12 +00:00
In a subsequent commit, all YAML files will be updated with
new package hashes since all packages needed rebuild due to
build system changes in commit adae27b8d1 ("Simplify
Makefiles for Packages"). So, we might as well bring all
packages up to the latest alpine base package.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
36 lines
1.1 KiB
Docker
36 lines
1.1 KiB
Docker
FROM linuxkit/alpine:c608d404c1cb36cce0c7d9303e30b52c9d81ccf0 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
|