Skip to content

Commit

Permalink
Merge pull request #58 from lima-vm/bump-nerdctl
Browse files Browse the repository at this point in the history
Update nerdctl 0.17.1 → 0.19.0
  • Loading branch information
jandubois authored Apr 23, 2022
2 parents ac84838 + e264e7b commit b9c0eb6
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 12 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,14 @@ RUN abuild-keygen -i -a -n
RUN apk update

ADD src/aports /home/build/aports

RUN if [ "${TARGETARCH}" = "arm64" ]; then pkg_arch=aarch64; else pkg_arch=x86_64; fi && \
mkdir -p /home/build/packages/lima/${pkg_arch} && \
cd /home/build/packages/lima/${pkg_arch} && \
apk fetch cni-plugins --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community && \
apk fetch cni-plugin-flannel --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community && \
apk index -o APKINDEX.tar.gz *.apk && \
abuild-sign APKINDEX.tar.gz

WORKDIR /home/build/aports/scripts
ENTRYPOINT ["sh", "./mkimage.sh"]
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ARCH_ALIAS_x86_64 = amd64
ARCH_ALIAS_aarch64 = arm64
ARCH_ALIAS = $(shell echo "$(ARCH_ALIAS_$(ARCH))")

NERDCTL_VERSION=0.17.1
NERDCTL_VERSION=0.19.0
QEMU_VERSION=v6.1.0
CRI_DOCKERD_VERSION=0.2.0-1
BINFMT_IMAGE=tonistiigi/binfmt:qemu-$(QEMU_VERSION)
Expand All @@ -30,6 +30,7 @@ BINFMT_IMAGE=tonistiigi/binfmt:qemu-$(QEMU_VERSION)
mkimage:
cd src/aports && git fetch && git checkout $(GIT_TAG)
$(DOCKER) build \
--progress plain --no-cache \
--tag mkimage:$(ALPINE_VERSION)-$(ARCH) \
--build-arg ALPINE_VERSION=$(ALPINE_VERSION) \
--build-arg BINFMT_IMAGE=$(BINFMT_IMAGE) \
Expand Down
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ${DOCKER} run --rm \
--tag "${TAG}" \
--outdir /iso \
--arch "${ARCH}" \
--repository "/home/build/packages/lima" \
--repository "http://dl-cdn.alpinelinux.org/alpine/${REPO_VERSION}/main" \
--repository "http://dl-cdn.alpinelinux.org/alpine/${REPO_VERSION}/community" \
--profile lima
Expand Down
1 change: 1 addition & 0 deletions edition/min
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export LIMA_INSTALL_BINFMT_MISC=false
export LIMA_INSTALL_CA_CERTIFICATES=false
export LIMA_INSTALL_CLOUD_INIT=false
export LIMA_INSTALL_CNI_PLUGINS=false
export LIMA_INSTALL_CNI_PLUGIN_FLANNEL=false
export LIMA_INSTALL_DOCKER=false
export LIMA_INSTALL_K3S=false
export LIMA_INSTALL_CRI_DOCKERD=false
Expand Down
1 change: 1 addition & 0 deletions edition/rd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ source edition/min
LIMA_INSTALL_BINFMT_MISC=true
LIMA_INSTALL_CA_CERTIFICATES=true
LIMA_INSTALL_CNI_PLUGINS=true
LIMA_INSTALL_CNI_PLUGIN_FLANNEL=true
LIMA_INSTALL_DOCKER=true
LIMA_INSTALL_CRI_DOCKERD=true
LIMA_INSTALL_IPTABLES=true
Expand Down
21 changes: 11 additions & 10 deletions genapkovl-lima.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,20 @@ if [ "${LIMA_INSTALL_CA_CERTIFICATES}" == "true" ]; then
echo "ca-certificates" >> "$tmp"/etc/apk/world
fi

if [ "${LIMA_INSTALL_CNI_PLUGINS}" == "true" ]; then
if [ "${LIMA_INSTALL_CNI_PLUGINS}" == "true" ] || [ "${LIMA_INSTALL_NERDCTL}" == "true" ]; then
echo "cni-plugins" >> "$tmp"/etc/apk/world
fi

if [ "${LIMA_INSTALL_CNI_PLUGIN_FLANNEL}" == "true" ]; then
echo "cni-plugin-flannel" >> "$tmp"/etc/apk/world
ARCH=amd64
if [ "$(uname -m)" == "aarch64" ]; then
ARCH=arm64
fi
mkdir -p "${tmp}/usr/libexec/cni"
ln -s "flannel-${ARCH}" "${tmp}/usr/libexec/cni/flannel"
fi

if [ "${LIMA_INSTALL_K3S}" == "true" ]; then
echo "k3s" >> "$tmp"/etc/apk/world
rc_add k3s default
Expand All @@ -228,15 +238,6 @@ if [ "${LIMA_INSTALL_NERDCTL}" == "true" ]; then
cp "${tmp}/nerdctl/bin/${bin}" "${tmp}/usr/local/bin/${bin}"
chmod u+s "${tmp}/usr/local/bin/${bin}"
done
if [ "${LIMA_INSTALL_CNI_PLUGINS}" == "true" ]; then
mkdir -p "${tmp}/usr/libexec/cni"
cp "${tmp}/nerdctl/libexec/cni/isolation" "${tmp}/usr/libexec/cni/isolation"
else
mkdir -p "${tmp}/usr/local/libexec/cni"
for plugin in bridge portmap firewall tuning isolation host-local; do
cp "${tmp}/nerdctl/libexec/cni/${plugin}" "${tmp}/usr/local/libexec/cni/${plugin}"
done
fi
fi

if [ "${LIMA_INSTALL_SSHFS}" == "true" ]; then
Expand Down
5 changes: 4 additions & 1 deletion mkimg.lima.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ profile_lima() {
if [ "${LIMA_INSTALL_CLOUD_INIT}" == "true" ]; then
apks="$apks cloud-init"
fi
if [ "${LIMA_INSTALL_CNI_PLUGINS}" == "true" ]; then
if [ "${LIMA_INSTALL_CNI_PLUGINS}" == "true" ] || [ "${LIMA_INSTALL_NERDCTL}" == "true" ]; then
apks="$apks cni-plugins"
fi
if [ "${LIMA_INSTALL_CNI_PLUGIN_FLANNEL}" == "true" ]; then
apks="$apks cni-plugin-flannel"
fi
if [ "${LIMA_INSTALL_DOCKER}" == "true" ]; then
apks="$apks libseccomp runc containerd tini-static device-mapper-libs"
apks="$apks docker-engine docker-openrc docker-cli docker"
Expand Down

0 comments on commit b9c0eb6

Please sign in to comment.