Skip to content

Commit b9c0eb6

Browse files
authored
Merge pull request #58 from lima-vm/bump-nerdctl
Update nerdctl 0.17.1 → 0.19.0
2 parents ac84838 + e264e7b commit b9c0eb6

File tree

7 files changed

+29
-12
lines changed

7 files changed

+29
-12
lines changed

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,14 @@ RUN abuild-keygen -i -a -n
1919
RUN apk update
2020

2121
ADD 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+
2231
WORKDIR /home/build/aports/scripts
2332
ENTRYPOINT ["sh", "./mkimage.sh"]

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ARCH_ALIAS_x86_64 = amd64
2121
ARCH_ALIAS_aarch64 = arm64
2222
ARCH_ALIAS = $(shell echo "$(ARCH_ALIAS_$(ARCH))")
2323

24-
NERDCTL_VERSION=0.17.1
24+
NERDCTL_VERSION=0.19.0
2525
QEMU_VERSION=v6.1.0
2626
CRI_DOCKERD_VERSION=0.2.0-1
2727
BINFMT_IMAGE=tonistiigi/binfmt:qemu-$(QEMU_VERSION)
@@ -30,6 +30,7 @@ BINFMT_IMAGE=tonistiigi/binfmt:qemu-$(QEMU_VERSION)
3030
mkimage:
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) \

build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

edition/min

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export LIMA_INSTALL_BINFMT_MISC=false
22
export LIMA_INSTALL_CA_CERTIFICATES=false
33
export LIMA_INSTALL_CLOUD_INIT=false
44
export LIMA_INSTALL_CNI_PLUGINS=false
5+
export LIMA_INSTALL_CNI_PLUGIN_FLANNEL=false
56
export LIMA_INSTALL_DOCKER=false
67
export LIMA_INSTALL_K3S=false
78
export LIMA_INSTALL_CRI_DOCKERD=false

edition/rd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ source edition/min
22
LIMA_INSTALL_BINFMT_MISC=true
33
LIMA_INSTALL_CA_CERTIFICATES=true
44
LIMA_INSTALL_CNI_PLUGINS=true
5+
LIMA_INSTALL_CNI_PLUGIN_FLANNEL=true
56
LIMA_INSTALL_DOCKER=true
67
LIMA_INSTALL_CRI_DOCKERD=true
78
LIMA_INSTALL_IPTABLES=true

genapkovl-lima.sh

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,20 @@ if [ "${LIMA_INSTALL_CA_CERTIFICATES}" == "true" ]; then
202202
echo "ca-certificates" >> "$tmp"/etc/apk/world
203203
fi
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
207207
fi
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+
209219
if [ "${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
240241
fi
241242

242243
if [ "${LIMA_INSTALL_SSHFS}" == "true" ]; then

mkimg.lima.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)