diff --git a/BUILD.md b/BUILD.md index 7497568e2..fa059741e 100644 --- a/BUILD.md +++ b/BUILD.md @@ -121,7 +121,7 @@ Started](https://linkerd.io/2/getting-started/) bin/k3d cluster create # build all docker images -DOCKER_TRACE=1 bin/docker-build +bin/docker-build # load all the images into k3d bin/image-load --k3d @@ -431,7 +431,7 @@ The `bin/docker-build-proxy` script builds the proxy by pulling a pre-published proxy binary: ```bash -DOCKER_TRACE=1 bin/docker-build-proxy +bin/docker-build-proxy ``` ### Multi-architecture builds diff --git a/TEST.md b/TEST.md index f93e685df..21b6fa60d 100644 --- a/TEST.md +++ b/TEST.md @@ -167,7 +167,7 @@ You can also test a locally-built version of the `linkerd` CLI. First build all of the Linkerd images by running: ```bash -DOCKER_TRACE=1 bin/docker-build +bin/docker-build ``` That command also copies the corresponding `linkerd` binaries into the diff --git a/bin/_docker.sh b/bin/_docker.sh index e10f023f2..6481f288f 100644 --- a/bin/_docker.sh +++ b/bin/_docker.sh @@ -11,9 +11,6 @@ bindir=$( cd "${BASH_SOURCE[0]%/*}" && pwd ) # docker registry in, for instance, CI. export DOCKER_REGISTRY=${DOCKER_REGISTRY:-ghcr.io/linkerd} -# When set, causes docker's build output to be emitted to stderr. -export DOCKER_TRACE=${DOCKER_TRACE:-} - # When set, use `docker buildx` and use the github actions cache to store/retrieve images export DOCKER_BUILDKIT=${DOCKER_BUILDKIT:-} @@ -50,11 +47,6 @@ docker_build() { file=$1 shift - output=/dev/null - if [ -n "$DOCKER_TRACE" ]; then - output=/dev/stderr - fi - rootdir=$( cd "$bindir"/.. && pwd ) if [ -n "$DOCKER_BUILDKIT" ]; then @@ -82,15 +74,13 @@ docker_build() { $output_params \ -t "$repo:$tag" \ -f "$file" \ - "$@" \ - > "$output" + "$@" else log_debug " :; docker build $rootdir -t $repo:$tag -f $file $*" docker build "$rootdir" \ -t "$repo:$tag" \ -f "$file" \ - "$@" \ - > "$output" + "$@" fi echo "$repo:$tag" diff --git a/bin/docker-test-proxy b/bin/docker-test-proxy index b187b8ec7..baf14de95 100755 --- a/bin/docker-test-proxy +++ b/bin/docker-test-proxy @@ -2,21 +2,13 @@ set -eu -# When set, causes docker's build output to be emitted to stderr. -export DOCKER_TRACE=${DOCKER_TRACE:-} export RUST_LOG=${RUST_LOG:-} bindir=$( cd "${BASH_SOURCE[0]%/*}" && pwd ) rootdir=$( cd "$bindir"/.. && pwd ) -if [ -n "$DOCKER_TRACE" ]; then - output=/dev/stderr -else - output=/dev/null -fi - docker build -f "$rootdir/proxy/Dockerfile" . \ --target build \ -t proxy-build \ - --build-arg=PROXY_UNOPTIMIZED=1 > $output + --build-arg=PROXY_UNOPTIMIZED=1 docker run --rm -it proxy-build env RUST_LOG="$RUST_LOG" cargo test "$@"