Skip to content

Commit

Permalink
Add progress=plain to all docker build commands
Browse files Browse the repository at this point in the history
This makes build output readable for Docker 24.x, which has a special
terminal output that's not a good choice when run as part of an
automated build.

Signed-off-by: Tom Wieczorek <[email protected]>
  • Loading branch information
twz123 committed Jan 5, 2024
1 parent 6d56d28 commit adb3c84
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ $(K0S_GO_BUILD_CACHE):
mkdir -p -- '$@'

.k0sbuild.docker-image.k0s: build/Dockerfile embedded-bins/Makefile.variables | $(K0S_GO_BUILD_CACHE)
docker build --iidfile '$@' \
docker build --progress=plain --iidfile '$@' \
--build-arg BUILDIMAGE=$(GOLANG_IMAGE) \
-t k0sbuild.docker-image.k0s - <build/Dockerfile

Expand Down Expand Up @@ -237,7 +237,7 @@ airgap-image-bundle-linux-arm.tar: .k0sbuild.image-bundler.stamp airgap-images.t
'$(shell cat .k0sbuild.image-bundler.stamp)' < airgap-images.txt > '$@'

.k0sbuild.image-bundler.stamp: hack/image-bundler/* embedded-bins/Makefile.variables
docker build --iidfile '$@' \
docker build --progress=plain --iidfile '$@' \
--build-arg ALPINE_VERSION=$(alpine_patch_version) \
-t k0sbuild.image-bundler -- hack/image-bundler

Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ cli:
ln -s k0s.md cli/README.md

.docker-image.serve-dev.stamp: Dockerfile.serve-dev requirements_pip.txt requirements.txt Makefile.variables
docker build \
docker build --progress=plain \
--build-arg PYTHON_IMAGE_VERSION=$(python_version)-alpine$(alpine_version) \
--build-arg KUBE_VERSION=$(kubernetes_version) \
-t 'k0sdocs$(basename $@)' -f '$<' .
Expand Down
2 changes: 1 addition & 1 deletion embedded-bins/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ build_docker_container = \
$(build_docker_container)

build_docker_image = \
docker build --iidfile '$@' -t k0sbuild$(basename $@):latest \
docker build --progress=plain --iidfile '$@' -t k0sbuild$(basename $@):latest \
--build-arg TARGET_OS=$(if $(findstring .windows.stamp,$@),windows,linux) \
--build-arg CONTAINERD_BINS="$(containerd_bins)" \
--build-arg KUBERNETES_BINS="$(kubernetes_bins)" \
Expand Down
2 changes: 1 addition & 1 deletion examples/bootloose-ha-controllers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build:

.PHONY: create-cluster
create-cluster: build
docker build -t k0s-bootloose .
docker build --progress=plain -t k0s-bootloose .
envsubst < bootloose.yaml.tpl > bootloose.yaml
bootloose create

Expand Down
2 changes: 1 addition & 1 deletion hack/tool/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ endif
endif

image:
docker build --build-arg ARCH=${HOST_ARCH} --build-arg HARDWARE=${HOST_HARDWARE} -t tool -f ./Dockerfile .
docker build --progress=plain --build-arg ARCH=${HOST_ARCH} --build-arg HARDWARE=${HOST_HARDWARE} -t tool -f ./Dockerfile .
8 changes: 4 additions & 4 deletions inttest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ bootloose_alpine_build_cmdline := \
bootloose-alpine

.bootloose-alpine.stamp: $(shell find bootloose-alpine -type f)
docker build --build-arg TARGETARCH=$(ARCH) $(bootloose_alpine_build_cmdline)
docker build --progress=plain --build-arg TARGETARCH=$(ARCH) $(bootloose_alpine_build_cmdline)
touch $@

# This is a special target to test the bootloose alpine image locally for all supported platforms.
.PHONY: check-bootloose-alpine-buildx
check-bootloose-alpine-buildx:
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 $(bootloose_alpine_build_cmdline)
docker buildx build --progress=plain --platform linux/amd64,linux/arm64,linux/arm/v7 $(bootloose_alpine_build_cmdline)

.bootloose-k0s.stamp: K0S_PATH ?= $(realpath ../k0s)
.bootloose-k0s.stamp: .bootloose-alpine.stamp
docker build \
docker build --progress=plain \
--build-arg K0S_PATH=$(notdir $(K0S_PATH)) \
-t bootloose-k0s \
-f bootloose-k0s/Dockerfile \
$(dir $(K0S_PATH))
touch $@

.update-server.stamp: .bootloose-alpine.stamp update-server/Dockerfile $(wildcard update-server/html/**/*.html)
docker build -t update-server --build-arg BASE=bootloose-alpine -f update-server/Dockerfile update-server
docker build --progress=plain -t update-server --build-arg BASE=bootloose-alpine -f update-server/Dockerfile update-server
touch $@

check-network: bin/sonobuoy
Expand Down

0 comments on commit adb3c84

Please sign in to comment.