Skip to content

Commit 1b5d59d

Browse files
committed
Add multi-arch support for test images
- Add a multi-arch image with linux/amd64 and linux/arm64 (limit to just what we are running in CI) - Bump versions to 2.0 as 1.0 is the single-arch image - Use `docker buildx` instead of just docker, so we don't need to build manifests by hand - busybox now does not have `nogroup`, since the test needs it, switch over from busybox to ubuntu for just the volume-ownership image Signed-off-by: Davanum Srinivas <[email protected]>
1 parent 9cf44ee commit 1b5d59d

3 files changed

Lines changed: 25 additions & 11 deletions

File tree

integration/images/volume-copy-up/Makefile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,20 @@
1515
all: build
1616

1717
PROJ=gcr.io/k8s-cri-containerd
18-
VERSION=1.0
18+
VERSION=2.0
1919
IMAGE=$(PROJ)/volume-copy-up:$(VERSION)
20+
PLATFORMS?=linux/amd64,linux/arm64
21+
22+
configure-docker:
23+
gcloud auth configure-docker
2024

2125
build:
22-
docker build -t $(IMAGE) .
26+
docker buildx build \
27+
$(OUTPUT) \
28+
--platform=${PLATFORMS} \
29+
--tag $(IMAGE) .
2330

24-
push:
25-
gcloud docker -- push $(IMAGE)
31+
push: OUTPUT=--push
32+
push: configure-docker build
2633

27-
.PHONY: build push
34+
.PHONY: configure-docker build push

integration/images/volume-ownership/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM busybox
15+
FROM ubuntu
1616
RUN mkdir -p /test_dir && \
1717
chown -R nobody:nogroup /test_dir
1818
VOLUME /test_dir

integration/images/volume-ownership/Makefile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,20 @@
1515
all: build
1616

1717
PROJ=gcr.io/k8s-cri-containerd
18-
VERSION=1.0
18+
VERSION=2.0
1919
IMAGE=$(PROJ)/volume-ownership:$(VERSION)
20+
PLATFORMS?=linux/amd64,linux/arm64
21+
22+
configure-docker:
23+
gcloud auth configure-docker
2024

2125
build:
22-
docker build -t $(IMAGE) .
26+
docker buildx build \
27+
$(OUTPUT) \
28+
--platform=${PLATFORMS} \
29+
--tag $(IMAGE) .
2330

24-
push:
25-
gcloud docker -- push $(IMAGE)
31+
push: OUTPUT=--push
32+
push: configure-docker build
2633

27-
.PHONY: build push
34+
.PHONY: configure-docker build push

0 commit comments

Comments
 (0)