File tree Expand file tree Collapse file tree 7 files changed +29
-12
lines changed
Expand file tree Collapse file tree 7 files changed +29
-12
lines changed Original file line number Diff line number Diff line change @@ -19,5 +19,14 @@ RUN abuild-keygen -i -a -n
1919RUN apk update
2020
2121ADD src/aports /home/build/aports
22+
23+ RUN if [ "${TARGETARCH}" = "arm64" ]; then pkg_arch=aarch64; else pkg_arch=x86_64; fi && \
24+ mkdir -p /home/build/packages/lima/${pkg_arch} && \
25+ cd /home/build/packages/lima/${pkg_arch} && \
26+ apk fetch cni-plugins --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community && \
27+ apk fetch cni-plugin-flannel --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community && \
28+ apk index -o APKINDEX.tar.gz *.apk && \
29+ abuild-sign APKINDEX.tar.gz
30+
2231WORKDIR /home/build/aports/scripts
2332ENTRYPOINT ["sh" , "./mkimage.sh" ]
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ ARCH_ALIAS_x86_64 = amd64
2121ARCH_ALIAS_aarch64 = arm64
2222ARCH_ALIAS = $(shell echo "$(ARCH_ALIAS_$(ARCH ) ) ")
2323
24- NERDCTL_VERSION =0.17.1
24+ NERDCTL_VERSION =0.19.0
2525QEMU_VERSION =v6.1.0
2626CRI_DOCKERD_VERSION =0.2.0-1
2727BINFMT_IMAGE =tonistiigi/binfmt:qemu-$(QEMU_VERSION )
@@ -30,6 +30,7 @@ BINFMT_IMAGE=tonistiigi/binfmt:qemu-$(QEMU_VERSION)
3030mkimage :
3131 cd src/aports && git fetch && git checkout $(GIT_TAG )
3232 $(DOCKER ) build \
33+ --progress plain --no-cache \
3334 --tag mkimage:$(ALPINE_VERSION ) -$(ARCH ) \
3435 --build-arg ALPINE_VERSION=$(ALPINE_VERSION ) \
3536 --build-arg BINFMT_IMAGE=$(BINFMT_IMAGE ) \
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ ${DOCKER} run --rm \
3030 --tag " ${TAG} " \
3131 --outdir /iso \
3232 --arch " ${ARCH} " \
33+ --repository " /home/build/packages/lima" \
3334 --repository " http://dl-cdn.alpinelinux.org/alpine/${REPO_VERSION} /main" \
3435 --repository " http://dl-cdn.alpinelinux.org/alpine/${REPO_VERSION} /community" \
3536 --profile lima
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ export LIMA_INSTALL_BINFMT_MISC=false
22export LIMA_INSTALL_CA_CERTIFICATES=false
33export LIMA_INSTALL_CLOUD_INIT=false
44export LIMA_INSTALL_CNI_PLUGINS=false
5+ export LIMA_INSTALL_CNI_PLUGIN_FLANNEL=false
56export LIMA_INSTALL_DOCKER=false
67export LIMA_INSTALL_K3S=false
78export LIMA_INSTALL_CRI_DOCKERD=false
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ source edition/min
22LIMA_INSTALL_BINFMT_MISC=true
33LIMA_INSTALL_CA_CERTIFICATES=true
44LIMA_INSTALL_CNI_PLUGINS=true
5+ LIMA_INSTALL_CNI_PLUGIN_FLANNEL=true
56LIMA_INSTALL_DOCKER=true
67LIMA_INSTALL_CRI_DOCKERD=true
78LIMA_INSTALL_IPTABLES=true
Original file line number Diff line number Diff line change @@ -202,10 +202,20 @@ if [ "${LIMA_INSTALL_CA_CERTIFICATES}" == "true" ]; then
202202 echo " ca-certificates" >> " $tmp " /etc/apk/world
203203fi
204204
205- if [ " ${LIMA_INSTALL_CNI_PLUGINS} " == " true" ]; then
205+ if [ " ${LIMA_INSTALL_CNI_PLUGINS} " == " true" ] || [ " ${LIMA_INSTALL_NERDCTL} " == " true " ] ; then
206206 echo " cni-plugins" >> " $tmp " /etc/apk/world
207207fi
208208
209+ if [ " ${LIMA_INSTALL_CNI_PLUGIN_FLANNEL} " == " true" ]; then
210+ echo " cni-plugin-flannel" >> " $tmp " /etc/apk/world
211+ ARCH=amd64
212+ if [ " $( uname -m) " == " aarch64" ]; then
213+ ARCH=arm64
214+ fi
215+ mkdir -p " ${tmp} /usr/libexec/cni"
216+ ln -s " flannel-${ARCH} " " ${tmp} /usr/libexec/cni/flannel"
217+ fi
218+
209219if [ " ${LIMA_INSTALL_K3S} " == " true" ]; then
210220 echo " k3s" >> " $tmp " /etc/apk/world
211221 rc_add k3s default
@@ -228,15 +238,6 @@ if [ "${LIMA_INSTALL_NERDCTL}" == "true" ]; then
228238 cp " ${tmp} /nerdctl/bin/${bin} " " ${tmp} /usr/local/bin/${bin} "
229239 chmod u+s " ${tmp} /usr/local/bin/${bin} "
230240 done
231- if [ " ${LIMA_INSTALL_CNI_PLUGINS} " == " true" ]; then
232- mkdir -p " ${tmp} /usr/libexec/cni"
233- cp " ${tmp} /nerdctl/libexec/cni/isolation" " ${tmp} /usr/libexec/cni/isolation"
234- else
235- mkdir -p " ${tmp} /usr/local/libexec/cni"
236- for plugin in bridge portmap firewall tuning isolation host-local; do
237- cp " ${tmp} /nerdctl/libexec/cni/${plugin} " " ${tmp} /usr/local/libexec/cni/${plugin} "
238- done
239- fi
240241fi
241242
242243if [ " ${LIMA_INSTALL_SSHFS} " == " true" ]; then
Original file line number Diff line number Diff line change @@ -20,9 +20,12 @@ profile_lima() {
2020 if [ " ${LIMA_INSTALL_CLOUD_INIT} " == " true" ]; then
2121 apks=" $apks cloud-init"
2222 fi
23- if [ " ${LIMA_INSTALL_CNI_PLUGINS} " == " true" ]; then
23+ if [ " ${LIMA_INSTALL_CNI_PLUGINS} " == " true" ] || [ " ${LIMA_INSTALL_NERDCTL} " == " true " ] ; then
2424 apks=" $apks cni-plugins"
2525 fi
26+ if [ " ${LIMA_INSTALL_CNI_PLUGIN_FLANNEL} " == " true" ]; then
27+ apks=" $apks cni-plugin-flannel"
28+ fi
2629 if [ " ${LIMA_INSTALL_DOCKER} " == " true" ]; then
2730 apks=" $apks libseccomp runc containerd tini-static device-mapper-libs"
2831 apks=" $apks docker-engine docker-openrc docker-cli docker"
You can’t perform that action at this time.
0 commit comments