kubernetes: Add local scripts after downloads
Caches much better.
@@ -30,9 +30,6 @@ RUN apk add --no-cache --initdb -p /out \
# Remove apk residuals. We have a read-only rootfs, so apk is of no use.
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
-ADD kubelet.sh /out/usr/bin/kubelet.sh
-ADD kubeadm-init.sh /out/usr/bin/kubeadm-init.sh
-
RUN curl -fSL -o /tmp/cni.tgz https://dl.k8s.io/network-plugins/cni-amd64-${cni_version}.tar.gz && \
mkdir -p /out/opt/cni /out/etc/cni/net.d && \
tar -xzf /tmp/cni.tgz -C /out/opt/cni
@@ -41,6 +38,9 @@ RUN curl -fSL -o /out/usr/bin/kubelet https://dl.k8s.io/${kubernetes_version}/bi
RUN curl -fSL -o /out/usr/bin/kubeadm https://dl.k8s.io/${kubernetes_version}/bin/linux/amd64/kubeadm && chmod 0755 /out/usr/bin/kubeadm
RUN curl -fSL -o /out/usr/bin/kubectl https://dl.k8s.io/${kubernetes_version}/bin/linux/amd64/kubectl && chmod 0755 /out/usr/bin/kubectl
+ADD kubelet.sh /out/usr/bin/kubelet.sh
+ADD kubeadm-init.sh /out/usr/bin/kubeadm-init.sh
+
FROM scratch
WORKDIR /
ENTRYPOINT ["/usr/bin/kubelet.sh"]
