File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,6 +79,13 @@ FORCE:
7979
8080build-proto : $(PROTO_GOFILES )
8181
82+ .PHONY : build-proto-dockerized
83+ build-proto-dockerized :
84+ $(Q ) docker build --build-arg ARTIFACTS=" $( dir $( PROTO_GOFILES) ) " --target final \
85+ --output type=local,dest=$(RESOLVED_PWD ) \
86+ -f hack/Dockerfile.buildproto .
87+ $(Q ) tar xf artifacts.tgz && rm -f artifacts.tgz
88+
8289build-plugins : $(PLUGINS )
8390
8491build-check :
Original file line number Diff line number Diff line change 1+ # Copyright The containerd Authors.
2+
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ ARG GO_VERSION=1.24
16+ ARG BASE_DEBIAN_DISTRO="bookworm"
17+
18+ FROM golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO} AS builder
19+ ARG ARTIFACTS
20+
21+ WORKDIR /go/src
22+
23+ RUN apt-get update && apt-get install -y unzip
24+
25+ RUN --mount=type=cache,target=/go/pkg/mod/ \
26+ --mount=src=.,target=. \
27+ make install-protoc-dependencies install-ttrpc-plugin install-wasm-plugin install-protoc
28+
29+ RUN --mount=type=cache,target=/go/pkg/mod/ \
30+ --mount=src=.,target=.,rw=true \
31+ make build-proto && \
32+ tar czf /artifacts.tgz ${ARTIFACTS}
33+
34+ FROM scratch AS final
35+
36+ COPY --from=builder /artifacts.tgz .
You can’t perform that action at this time.
0 commit comments