mirror of
https://github.com/kubernetes-sigs/kind.git
synced 2025-12-01 07:26:05 +07:00
port kindnetd to buildkit
This commit is contained in:
@@ -12,7 +12,14 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ARG GOARCH=amd64
|
||||
FROM gcr.io/google-containers/debian-iptables-${GOARCH}:v12.0.1
|
||||
COPY --chown=root:root kindnetd /bin/kindnetd
|
||||
# first stage build kindnetd binary
|
||||
# NOTE: tentatively follow upstream kubernetes go version based on k8s in go.mod
|
||||
FROM golang:1.13
|
||||
WORKDIR /go/src
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -o ./kindnetd ./cmd/kindnetd
|
||||
|
||||
# build real kindnetd image
|
||||
FROM gcr.io/google-containers/debian-iptables:v12.0.1
|
||||
COPY --from=0 --chown=root:root ./go/src/kindnetd /bin/kindnetd
|
||||
CMD ["/bin/kindnetd"]
|
||||
|
||||
Reference in New Issue
Block a user