diff --git a/node/Dockerfile b/node/Dockerfile index 084d8f2d..73eee66c 100644 --- a/node/Dockerfile +++ b/node/Dockerfile @@ -6,19 +6,6 @@ ARG TARGETARCH RUN apt-get update -yq && \ apt-get install -yq --no-install-recommends wget apparmor apparmor-utils jq openssh-server sudo -# Gardener's cloud-config-downloader still needs the docker CLI to be present in the image for preloading the hyperkube image, -# see https://github.com/gardener/gardener/issues/4673 -# Install nerdctl as a (mostly) docker-compatible replacement and fool the cloud-config-downloader with a small wrapper -# this is quite hacky but relieves us from installing docker here -ARG NERDCTL_VERSION=1.6.0 -RUN curl -Lo /tmp/nerdctl.tar.gz https://github.com/containerd/nerdctl/releases/download/v$NERDCTL_VERSION/nerdctl-$NERDCTL_VERSION-$TARGETOS-$TARGETARCH.tar.gz && \ - tar Cxzvvf /usr/local/bin /tmp/nerdctl.tar.gz && \ - rm -f /tmp/nerdctl.tar.gz - -# add our small nerdctl wrapper and disguise it as docker -COPY docker /usr/bin/docker -RUN chmod +x /usr/bin/docker - # remove kind's kubelet unit RUN rm -f /etc/systemd/system/kubelet.service && \ rm -rf /etc/systemd/system/kubelet.service.d/ diff --git a/node/docker b/node/docker deleted file mode 100755 index ed819417..00000000 --- a/node/docker +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o nounset -set -o pipefail - -case "${1:-}" in - run) - # by default, nerdctl run (like docker run) uses the bridge network. However, the respective CNI plugin is not - # installed so we need to add --net=none to run the hyperkube image during node bootstrap - exec nerdctl run --net=none "${@:2}" - ;; - cp) - # cp command is a docker-only feature and nerdctl doesn't have an equivalent command - # mimic cp by copying from rootfs dir (really hacky) - container_id="${2%:*}" - copy_src="${2#*:}" - rootfs_path="/run/containerd/io.containerd.runtime.v2.task/default/$container_id/rootfs" - copy_dest="${3}" - cp "$rootfs_path$copy_src" "$copy_dest" - ;; - *) - # delegate all other commands to nerdctl - exec nerdctl "$@" - ;; -esac