From 23e36adb1770081f091fd7bd638c4828345bc34b Mon Sep 17 00:00:00 2001 From: fabriziopandini Date: Fri, 19 Jun 2020 16:18:00 +0200 Subject: [PATCH] document docker version requirements --- Dockerfile | 4 ++-- docs/book/src/clusterctl/developers.md | 2 +- docs/book/src/developer/guide.md | 4 ++-- docs/book/src/developer/tilt.md | 4 ++-- test/infrastructure/docker/Dockerfile | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8d0e43ec6f61..87a357150ed4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,7 @@ RUN go mod download # Copy the sources COPY ./ ./ -# Cache the go build +# Cache the go build into the the Go’s compiler cache folder so we take benefits of compiler caching across docker build calls RUN --mount=type=cache,target=/root/.cache/go-build \ go build . @@ -42,7 +42,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ ARG package=. ARG ARCH -# Do not force rebuild of up-to-date packages (do not use -a) +# Do not force rebuild of up-to-date packages (do not use -a) and use the compiler cache folder RUN --mount=type=cache,target=/root/.cache/go-build \ CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \ go build -ldflags '-extldflags "-static"' \ diff --git a/docs/book/src/clusterctl/developers.md b/docs/book/src/clusterctl/developers.md index 08f2922b79e6..70c8b8d2e6cc 100644 --- a/docs/book/src/clusterctl/developers.md +++ b/docs/book/src/clusterctl/developers.md @@ -4,7 +4,7 @@ This document describes how to use `clusterctl` during the development workflow. ## Prerequisites -* A Cluster API development setup (go, git, etc.) +* A Cluster API development setup (go, git, kind v0.7 or newer, Docker v19.03 or newer etc.) * A local clone of the Cluster API GitHub repository * A local clone of the GitHub repositories for the providers you want to install diff --git a/docs/book/src/developer/guide.md b/docs/book/src/developer/guide.md index 830cb93efb5b..16f5e911988f 100644 --- a/docs/book/src/developer/guide.md +++ b/docs/book/src/developer/guide.md @@ -20,14 +20,14 @@ Other providers may have additional steps you need to follow to get up and runni ### Docker Iterating on the cluster API involves repeatedly building Docker containers. -You'll need the [docker daemon][docker] available. +You'll need the [docker daemon][docker] v19.03 or newer available. [docker]: https://docs.docker.com/install/ ### A Cluster You'll likely want an existing cluster as your [management cluster][mcluster]. -The easiest way to do this is with [kind], as explained in the quick start. +The easiest way to do this is with [kind] v0.7 or newer, as explained in the quick start. Make sure your cluster is set as the default for `kubectl`. If it's not, you will need to modify subsequent `kubectl` commands below. diff --git a/docs/book/src/developer/tilt.md b/docs/book/src/developer/tilt.md index fd37cecc76eb..25b553fe333d 100644 --- a/docs/book/src/developer/tilt.md +++ b/docs/book/src/developer/tilt.md @@ -7,8 +7,8 @@ workflow that offers easy deployments and rapid iterative builds. ## Prerequisites -1. [Docker](https://docs.docker.com/install/) -1. [kind](https://kind.sigs.k8s.io) v0.6 or newer +1. [Docker](https://docs.docker.com/install/) v19.03 or newer +1. [kind](https://kind.sigs.k8s.io) v0.7 or newer (other clusters can be used if `preload_images_for_kind` is set to false) 1. [kustomize](https://github.com/kubernetes-sigs/kustomize/blob/master/docs/INSTALL.md) standalone (`kubectl kustomize` does not work because it is missing some features of kustomize v3) diff --git a/test/infrastructure/docker/Dockerfile b/test/infrastructure/docker/Dockerfile index 7a45534800ea..90c60c823c12 100644 --- a/test/infrastructure/docker/Dockerfile +++ b/test/infrastructure/docker/Dockerfile @@ -42,7 +42,7 @@ COPY . . # Essentially, change directories into CAPD WORKDIR /workspace/test/infrastructure/docker -# Build the CAPD manager +# Build the CAPD manager using the compiler cache folder RUN --mount=type=cache,target=/root/.cache/go-build \ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o /workspace/manager main.go