A few small improvements to our docker build scripts:
* Centralized the list of docker images to a DOCKER_IMAGES variable defined in _docker.sh
* Build scripts now honor the TAG variable, if defined
* Unused docker-images script has been removed
We also update the `--control-plane-version` Linkerd install flag to affect the policy controller version as well.
Taken together, this enables the following workflow for building and deploying changes to individual Linkerd components. For example, suppose you wish to deploy changes which only affect the controller image:
```console
# Begin by building all images at main with a dev tag
> TAG=alex-dev bin/docker-build
# OR begin by retagging all images from a recent release
> bin/docker-retag-all edge-21.8.4 alex-dev
# Make changes and then rebuild specific component
> TAG=alex-dev bin/docker-build-controller
# Load images into kind
> TAG=alex-dev bin/image-load --kind --cluster alex
# Install Linkerd
> bin/linkerd install --control-plane-version alex-dev --proxy-version alex-dev | k apply -f -
```
Signed-off-by: Alex Leong <alex@buoyant.io>
Removed the dependency on the base image, and instead install the needed packages in the Dockerfiles for debug and CNI.
Also removed some obsolete info from BUILD.md
Signed-off-by: Ali Ariff <ali.ariff12@gmail.com>
Using `/bin/env` increases portability for the shell scripts (and often using `/bin/env` is requested by e.g. Mac users). This would also facilitate testing scripts with different Bash versions via the Bash containers, as they have bash in `/usr/local` and not `/bin`. Using `/bin/env`, there is no need to change the script when testing. (I assume the latter was behind c301ea214b (diff-ecec5e3a811f60bc2739019004fa35b0), which would not happen using `/bin/env`.)
Signed-off-by: Joakim Roubert <joakimr@axis.com>
The SC1090 "Can't follow non-constant source" issue is addressed in the way suggested in shellcheck's documentation; the source paths are pointed out in shellcheck comments. By adding the bin dir to the -P shellcheck CLI parameter, we avoid having to state the bin directory in each and every script file.
Signed-off-by: Joakim Roubert <joakimr@axis.com>
Handling of whitespace paths was not fully implemented; this patch adds
the missing pieces. Also, only use bash where bash-specific
functionality is used/needed.
Signed-off-by: Joakim Roubert <joakimr@axis.com>