File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99ARG GOLANG_VERSION=1.11
1010
11+ FROM golang:${GOLANG_VERSION} AS golang-base
12+ RUN mkdir -p /go/src/github.com/containerd/containerd
13+ WORKDIR /go/src/github.com/containerd/containerd
14+
1115# Install proto3
12- FROM golang:${GOLANG_VERSION} AS proto3
16+ FROM golang-base AS proto3
1317RUN apt-get update && apt-get install -y \
1418 autoconf \
1519 automake \
@@ -22,17 +26,17 @@ COPY script/setup/install-protobuf install-protobuf
2226RUN ./install-protobuf
2327
2428# Install runc
25- FROM golang:${GOLANG_VERSION} AS runc
29+ FROM golang-base AS runc
2630RUN apt-get update && apt-get install -y \
2731 curl \
2832 libseccomp-dev \
2933 --no-install-recommends
3034
31- COPY vendor.conf /go/src/github.com/containerd/containerd/ vendor.conf
35+ COPY vendor.conf vendor.conf
3236COPY script/setup/install-runc install-runc
3337RUN ./install-runc
3438
35- FROM golang:${GOLANG_VERSION} AS dev
39+ FROM golang-base AS dev
3640RUN apt-get update && apt-get install -y \
3741 btrfs-tools \
3842 gcc \
@@ -46,6 +50,4 @@ COPY --from=proto3 /usr/local/bin/protoc /usr/local/bin/protoc
4650COPY --from=proto3 /usr/local/include/google /usr/local/include/google
4751COPY --from=runc /usr/local/sbin/runc /usr/local/go/bin/runc
4852
49- COPY . /go/src/github.com/containerd/containerd
50-
51- WORKDIR /go/src/github.com/containerd/containerd
53+ COPY . .
You can’t perform that action at this time.
0 commit comments