diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d66c7f6..a09c00b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,13 +27,15 @@ jobs: TAGS="${DOCKER_IMAGE}:${GIT_BRANCH}, ghcr.io/${{ github.repository_owner }}/baseimage:${GIT_BRANCH}" # Determine BASE_IMAGE from release tag prefix (e.g. noble-1.0.2 -> ubuntu:24.04) - if [[ "${GIT_BRANCH}" == noble-* ]]; then + if [[ "${GIT_BRANCH}" == resolute-* ]]; then + BASE_IMAGE="ubuntu:26.04" + elif [[ "${GIT_BRANCH}" == noble-* ]]; then BASE_IMAGE="ubuntu:24.04" elif [[ "${GIT_BRANCH}" == jammy-* ]]; then BASE_IMAGE="ubuntu:22.04" else # Default to noble (latest LTS) for unrecognised tag prefixes - echo "::warning::Unrecognized release tag prefix '${GIT_BRANCH}'. Expected it to start with 'noble-' or 'jammy-'. Defaulting BASE_IMAGE to ubuntu:24.04 (Noble)." + echo "::warning::Unrecognized release tag prefix '${GIT_BRANCH}'. Expected it to start with 'resolute-', 'noble-', or 'jammy-'. Defaulting BASE_IMAGE to ubuntu:24.04 (Noble)." BASE_IMAGE="ubuntu:24.04" fi diff --git a/.github/workflows/scheduled-build.yml b/.github/workflows/scheduled-build.yml index 05a33e5..263080d 100644 --- a/.github/workflows/scheduled-build.yml +++ b/.github/workflows/scheduled-build.yml @@ -19,6 +19,8 @@ jobs: fail-fast: false matrix: include: + - ubuntu_codename: resolute + base_image: ubuntu:26.04 - ubuntu_codename: noble base_image: ubuntu:24.04 - ubuntu_codename: jammy diff --git a/README.md b/README.md index 3f9960b..3bd71e4 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ You can configure the stock `ubuntu` image yourself from your Dockerfile, so why | Component | Why is it included? / Remarks | | ---------------- | ------------------- | -| Ubuntu 24.04 LTS | The base system. | +| Ubuntu 26.04 LTS (Resolute) or 24.04 LTS (Noble) | The base system. Ubuntu 26.04 "Resolute" is the latest LTS; 24.04 "Noble" and 22.04 "Jammy" tracks are also maintained. | | A **correct** init process | _Main article: [Docker and the PID 1 zombie reaping problem](http://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/)._

According to the Unix process model, [the init process](https://en.wikipedia.org/wiki/Init) -- PID 1 -- inherits all [orphaned child processes](https://en.wikipedia.org/wiki/Orphan_process) and must [reap them](https://en.wikipedia.org/wiki/Wait_(system_call)). Most Docker containers do not have an init process that does this correctly. As a result, their containers become filled with [zombie processes](https://en.wikipedia.org/wiki/Zombie_process) over time.

Furthermore, `docker stop` sends SIGTERM to the init process, which stops all services. Unfortunately most init systems don't do this correctly within Docker since they're built for hardware shutdowns instead. This causes processes to be hard killed with SIGKILL, which doesn't give them a chance to correctly deinitialize things. This can cause file corruption.

Baseimage-docker comes with an init process `/sbin/my_init` that performs both of these tasks correctly. | | Fixes APT incompatibilities with Docker | See https://github.com/dotcloud/docker/issues/1024. | | syslog-ng | A syslog daemon is necessary so that many services - including the kernel itself - can correctly log to /var/log/syslog. If no syslog daemon is running, a lot of important messages are silently swallowed.

Only listens locally. All syslog messages are forwarded to "docker logs".

Why syslog-ng?
I've had bad experience with rsyslog. I regularly run into bugs with rsyslog, and once in a while it takes my log host down by entering a 100% CPU loop in which it can't do anything. Syslog-ng seems to be much more stable. | diff --git a/image/prepare.sh b/image/prepare.sh index 31cf6e2..f2a790d 100755 --- a/image/prepare.sh +++ b/image/prepare.sh @@ -12,9 +12,21 @@ echo -n no > /etc/container_environment/INITRD ## Enable Ubuntu Universe, Multiverse, and deb-src for main. if grep -E '^ID=' /etc/os-release | grep -q ubuntu; then - sed -i 's/^#\s*\(deb.*main restricted\)$/\1/g' /etc/apt/sources.list - sed -i 's/^#\s*\(deb.*universe\)$/\1/g' /etc/apt/sources.list - sed -i 's/^#\s*\(deb.*multiverse\)$/\1/g' /etc/apt/sources.list + UBUNTU_VERSION=$(grep '^VERSION_ID=' /etc/os-release | cut -d'"' -f2) + # Ubuntu 24.04+ uses DEB822 format (.sources files); older releases use sources.list + if dpkg --compare-versions "$UBUNTU_VERSION" ge "24.04" 2>/dev/null && \ + compgen -G '/etc/apt/sources.list.d/*.sources' > /dev/null; then + # DEB822 format: enable universe and multiverse components + for f in /etc/apt/sources.list.d/*.sources; do + sed -i 's/^Components: main$/Components: main restricted universe multiverse/' "$f" + sed -i 's/^Components: main restricted$/Components: main restricted universe multiverse/' "$f" + done + else + # Legacy sources.list format (Ubuntu < 24.04) + sed -i 's/^#\s*\(deb.*main restricted\)$/\1/g' /etc/apt/sources.list + sed -i 's/^#\s*\(deb.*universe\)$/\1/g' /etc/apt/sources.list + sed -i 's/^#\s*\(deb.*multiverse\)$/\1/g' /etc/apt/sources.list + fi fi apt-get update