From bc6ae91a707d3e22f0037e11505f421a49b9cd3f Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Tue, 20 Apr 2021 13:21:46 +0200 Subject: [PATCH] Add new ubuntu-oci project This is a copy of the ubuntu-base project. Currently ubuntu-base is used as a base for the docker/OCI container images. The rootfs tarball that is created with ubuntu-base is published under [0]. That tarball is used in the FROM statement of the Dockerfile as base and then a couple of modifications are done inside of the Dockerfile[1]. The ubuntu-oci project will include the changes that are currently done in the Dockerfile. With that: 1) a Dockerfile using that tarball will be just a 2 line thing: FROM scratch ADD ubuntu-hirsute-core-cloudimg-amd64-root.tar.gz / CMD ["/bin/bash"] 2) Ubuntu has the full control about the build process of the docker/OCI container. No external sources (like [1]) need to be modified anymore. 3) Ubuntu can publish containers without depending on the official dockerhub containers[2]. Currently the containers for the AWS ECR registry[3] use as a base[4] the official dockerhub containers. That's no longer needed because a container just needs a Dockerfile described in 1) When the ubuntu-oci project has the modifications from [1] included, we'll also update [1] to use the ubuntu-oci rootfs tarball as a base and drop the modifications done at [1]. Note: Creating a new ubuntu-oci project instead of using ubuntu-base will make sure that we don't break users who are currently using ubuntu-base rootfs tarballs for doing their own thing. [0] https://partner-images.canonical.com/core/ [1] https://github.com/tianon/docker-brew-ubuntu-core/blob/master/update.sh [2] https://hub.docker.com/_/ubuntu [3] https://gallery.ecr.aws/ubuntu/ubuntu [4] https://launchpad.net/~ubuntu-docker-images/ubuntu-docker-images/+oci/ubuntu/+recipe/ubuntu-20.04 (cherry picked from commit ac4a95b9314cf1f8ce01f42016c271c0a6078372) --- live-build/auto/config | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/live-build/auto/config b/live-build/auto/config index 7f0b27c3..c75dea52 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -317,7 +317,7 @@ if [ "$PREINSTALLED" = "true" ]; then ubuntu-server) add_package live oem-config-debconf ubiquity-frontend-debconf ;; - ubuntu-core|ubuntu-base|base|ubuntu-touch|ubuntu-touch-custom|ubuntu-cpc|ubuntu-desktop-next) + ubuntu-core|ubuntu-base|base|ubuntu-touch|ubuntu-touch-custom|ubuntu-cpc|ubuntu-desktop-next|ubuntu-oci) ;; ubuntu) add_package live oem-config-gtk ubiquity-frontend-gtk @@ -672,6 +672,10 @@ case $PROJECT in OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal" ;; + ubuntu-oci) + OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal" + ;; + ubuntu-touch|ubuntu-touch-custom) HINTS="packagekit ubuntu-system-settings" case $ARCH in @@ -925,7 +929,7 @@ case $ARCH in esac case $PROJECT:${SUBPROJECT:-} in - ubuntu-server:*|ubuntu-base:*|ubuntu-touch:*|ubuntu-touch-custom:*) + ubuntu-server:*|ubuntu-base:*|ubuntu-touch:*|ubuntu-touch-custom:*|ubuntu-oci:*) OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none" KERNEL_FLAVOURS=none BINARY_REMOVE_LINUX=false