Description
Currently we are using the KIND base image for the KIC driver:
https://github.com/kubernetes/minikube/blob/master/hack/images/kicbase.Dockerfile
# which is an ubuntu 19.10 with an entry-point that helps running systemd
# could be changed to any debian that can run systemd
FROM kindest/base:v20200122-2dfe64b2 as base
This image (docker.io/kindest/base) is in turn based on Ubuntu:
https://github.com/kubernetes-sigs/kind/blob/master/images/base/Dockerfile
# start from ubuntu 19.10, this image is reasonably small as a starting point
# for a kubernetes node image, it doesn't contain much we don't need
FROM ubuntu:19.10
As with the other base images, this one starts from a rootfs tarball:
https://hub.docker.com/_/ubuntu
FROM scratch
ADD ubuntu-eoan-core-cloudimg-amd64-root.tar.gz /
See https://docs.docker.com/develop/develop-images/baseimages/
We might want to investigate using the same Linux that we are using for minikube.iso,
a custom distribution built using Buildroot which also includes systemd and the runtimes.
https://github.com/kubernetes/minikube/tree/master/deploy/iso/minikube-iso
The main difference would be that the regular ISO also includes a kernel (currently 4.19),
while the container image uses the host kernel (so it doesn't need to waste all that space)
Links:
- https://buildroot.org/downloads/manual/manual.html
- blog.docker.com/2013/06/create-light-weight-docker-containers-buildroot
There are lots of other small tricks needed, in order to make a running container image.
Including a lot of workaround and hacks, to be able to run systemd
in a a container...
As per above, you can see several of these in the original Ubuntu image (vs Ubuntu ISO),
as well as from the KIND and KIC projects respectively. Some of these will need to be added.
https://github.com/kubernetes-sigs/kind/blob/master/images/base/files/usr/local/bin/entrypoint