Skip to content

Commit 789e59a

Browse files
markpashkkourt
authored andcommitted
kind: Prepare a kind image
Signed-off-by: Mark Pashmfouroush <[email protected]>
1 parent f56f4de commit 789e59a

File tree

7 files changed

+248
-204
lines changed

7 files changed

+248
-204
lines changed

.github/workflows/buildx.yaml

+34-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
file: dockerfiles/kernel-builder
3030
tags: quay.io/lvh-images/kernel-builder:latest
3131

32-
kernel-image:
32+
kernel-images:
3333
needs: kernel-builder
3434
strategy:
3535
matrix:
@@ -55,7 +55,7 @@ jobs:
5555
no-cache: true
5656
build-args: |
5757
"KERNEL_VER=${{ matrix.kernel }}"
58-
file: dockerfiles/kernel-image
58+
file: dockerfiles/kernel-images
5959
tags: quay.io/lvh-images/kernel-images:${{ matrix.kernel }}
6060

6161
root-builder:
@@ -82,6 +82,7 @@ jobs:
8282
tags: quay.io/lvh-images/root-builder:latest
8383

8484
root-images:
85+
needs: root-builder
8586
runs-on: ubuntu-latest
8687
timeout-minutes: 60
8788
steps:
@@ -105,3 +106,34 @@ jobs:
105106
security.insecure
106107
file: dockerfiles/root-images
107108
tags: quay.io/lvh-images/root-images:latest
109+
110+
kind-images:
111+
needs: [ kernel-images, root-images ]
112+
strategy:
113+
matrix:
114+
kernel: [ "4.19", "5.4", "5.10", "5.15", "bpf-next" ]
115+
runs-on: ubuntu-latest
116+
timeout-minutes: 60
117+
steps:
118+
- name: checkout
119+
uses: actions/checkout@v3
120+
- name: buildx
121+
uses: docker/setup-buildx-action@v2
122+
- name: quay login
123+
uses: docker/login-action@v2
124+
with:
125+
registry: quay.io
126+
username: ${{ secrets.QUAY_USERNAME }}
127+
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
128+
- name: build and push
129+
uses: docker/build-push-action@v3
130+
with:
131+
context: .
132+
push: true
133+
no-cache: true
134+
allow: |
135+
security.insecure
136+
build-args: |
137+
"KERNEL_VER=${{ matrix.kernel }}"
138+
file: dockerfiles/kind-images
139+
tags: quay.io/lvh-images/kind:${{ matrix.kernel }}

Makefile

+14-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
1-
2-
OCIORG ?= quay.io/lvh-images
1+
OCIORG ?= quay.io/lvh-images
32
LVH ?= $(OCIORG)/lvh
43
ROOT_BUILDER ?= $(OCIORG)/root-builder
54
ROOT_IMAGES ?= $(OCIORG)/root-images
65
KERNEL_BUILDER ?= $(OCIORG)/kernel-builder
7-
KERNEL_IMAGES ?= $(OCIORG)/kernel-images
8-
DOCKER ?= docker
6+
KERNEL_IMAGES ?= $(OCIORG)/kernel-images
7+
KIND_IMAGES ?= $(OCIORG)/kind
98

109
KERNEL_VERSIONS=4.19 5.4 5.10 5.15 bpf-next
1110

11+
DOCKER ?= docker
12+
export DOCKER_BUILDKIT = 1
13+
1214
.PHONY: all
1315
all:
1416
@echo "Available targets:"
1517
@echo " images_builder: build root fs builder images"
1618
@echo " kernels_builder: build root kernel builder images"
1719
@echo " images: build root fs images"
1820
@echo " kernels: build root kernel images"
21+
@echo " kind: build root kind images"
1922

2023
.PHONY: images_builder
2124
images_builder:
@@ -32,5 +35,11 @@ kernels_builder:
3235
.PHONY: kernels
3336
kernels: kernels_builder
3437
for v in $(KERNEL_VERSIONS) ; do \
35-
$(DOCKER) build --build-arg KERNEL_VER=$$v -f dockerfiles/kernel-image -t $(KERNEL_IMAGES):$$v . ; \
38+
$(DOCKER) build --no-cache --build-arg KERNEL_VER=$$v -f dockerfiles/kernel-images -t $(KERNEL_IMAGES):$$v . ; \
39+
done
40+
41+
.PHONY: kind
42+
kind: kernels images
43+
for v in $(KERNEL_VERSIONS) ; do \
44+
$(DOCKER) build --no-cache --build-arg KERNEL_VER=$$v -f dockerfiles/kind-images -t $(KIND_IMAGES):$$v . ; \
3645
done

_data/bootstrap/deb-docker.sh

+3
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ EOF
1414

1515
apt-get update --quiet && apt-get install --quiet --yes --no-install-recommends \
1616
docker-ce docker-ce-cli containerd.io
17+
18+
# for iptables 1.8.8
19+
update-alternatives --set iptables /usr/sbin/iptables-legacy

0 commit comments

Comments
 (0)