Skip to content

Commit dc0fece

Browse files
[backplane-2.10] introduce CONTAINER_ENGINE to allow better integration (#350)
Signed-off-by: Riccardo Piccoli <[email protected]> Co-authored-by: Riccardo Piccoli <[email protected]>
1 parent 10f0c51 commit dc0fece

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ CLUSTERCTL_BIN := clusterctl
3131
CLUSTERCTL := $(abspath $(TOOLS_BIN_DIR)/$(CLUSTERCTL_BIN))
3232
CLUSTERCTL_PLATFORM := linux-amd64
3333

34+
CONTAINER_ENGINE ?= docker
35+
3436
build-helm-charts: $(YQ) $(KUSTOMIZE) $(CLUSTERCTL) $(HELM)
3537
(export YQ=$(YQ) CLUSTERCTL=$(CLUSTERCTL) KUSTOMIZE=$(KUSTOMIZE) HELM=$(HELM); $(MAKE) -C ./charts build)
3638

@@ -45,8 +47,8 @@ clean:
4547

4648
.PHONY: build-docker
4749
build-docker:
48-
docker --version|grep -q podman && MOUNT_FLAGS=",Z" ; \
49-
docker run --rm --interactive --workdir=/workspace --mount=type=bind,src=./,target=/workspace$${MOUNT_FLAGS} docker.io/library/golang:1.24.0 make build-helm-charts TOOLS_DIR=hack-docker/tools
50+
$(CONTAINER_ENGINE) --version|grep -q podman && MOUNT_FLAGS=",Z" ; \
51+
$(CONTAINER_ENGINE) run --rm --interactive --workdir=/workspace --mount=type=bind,src=./,target=/workspace$${MOUNT_FLAGS} docker.io/library/golang:1.24.0 make build-helm-charts TOOLS_DIR=hack-docker/tools
5052

5153
$(KUSTOMIZE): # Build kustomize from tools folder.
5254
CGO_ENABLED=0 GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) $(KUSTOMIZE_PKG) $(KUSTOMIZE_BIN) $(KUSTOMIZE_VER)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ See [this documentation](./doc/Adding-NewProvider.md) if you want to add a new p
5555
* The result should be the same as `make`.
5656
* A Docker container is used for a more unified build environment.
5757
* Use this if you encounter issues with the standard `make` command.
58+
* NOTE: if we want to use a different container engine, set CONTAINER_ENGINE environment variable (i.e. `export CONTAINER_EINGINE=podman`)
5859
* To check chart deployment:
5960
```sh
6061
make test-charts-crc

0 commit comments

Comments
 (0)