Skip to content

fix: docker-in-docker on Ubuntu 26.04 — verify iptables-legacy works before switching#1637

Open
Copilot wants to merge 7 commits intomainfrom
copilot/fix-docker-in-docker-ubuntu-26-04
Open

fix: docker-in-docker on Ubuntu 26.04 — verify iptables-legacy works before switching#1637
Copilot wants to merge 7 commits intomainfrom
copilot/fix-docker-in-docker-ubuntu-26-04

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 5, 2026

Docker daemon fails to start on Ubuntu 26.04 (resolute) because the kernel no longer supports legacy iptables NAT tables. The install script was unconditionally switching to iptables-legacy whenever the binary existed, regardless of kernel support.

Changes

  • iptables fallback logic — Verify iptables-legacy actually works (-nL probe) before switching to it; fall back to iptables-nft if legacy fails:
    if type iptables-legacy > /dev/null 2>&1 && iptables-legacy -nL > /dev/null 2>&1; then
        update-alternatives --set iptables /usr/sbin/iptables-legacy
        update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
    elif type iptables-nft > /dev/null 2>&1 && iptables-nft -nL > /dev/null 2>&1; then
        update-alternatives --set iptables /usr/sbin/iptables-nft
        update-alternatives --set ip6tables /usr/sbin/ip6tables-nft
    fi
  • Add resolute codename to DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES and DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES
  • Add test scenario docker_build_ubuntu_resolute targeting ubuntu:resolute with moby: false (moby is not yet supported on Ubuntu resolute)
  • Minor version bump from 2.16.12.17.0 in devcontainer-feature.json

Copilot AI and others added 2 commits May 5, 2026 08:28
…before switching, falling back to iptables-nft

Agent-Logs-Url: https://github.com/devcontainers/features/sessions/af4f00a5-8bfc-472b-97e3-735ddf7a07c1

Co-authored-by: Kaniska244 <186041440+Kaniska244@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix docker-in-docker feature on Ubuntu 26.04 fix: docker-in-docker on Ubuntu 26.04 — verify iptables-legacy works before switching May 5, 2026
Copilot AI requested a review from Kaniska244 May 5, 2026 08:29
Copy link
Copy Markdown
Contributor

@Kaniska244 Kaniska244 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Why assuming ubuntu-26.04 is plucky, shouldn't it be resolute?

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 5, 2026

@copilot Why assuming ubuntu-26.04 is plucky, shouldn't it be resolute?

You're right — Ubuntu 26.04 LTS is "Resolute Raccoon", not "Plucky" (which is 25.04). Fixed in 77dbcc3: updated codenames and test scenario to use resolute.

Copilot AI requested a review from Kaniska244 May 5, 2026 08:37
Copy link
Copy Markdown
Contributor

@Kaniska244 Kaniska244 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Do a minor version bump of the feature as well

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 5, 2026

@copilot Do a minor version bump of the feature as well

Done — bumped from 2.16.1 → 2.17.0 in 6fc10b9.

Copilot AI requested a review from Kaniska244 May 5, 2026 08:41
Copy link
Copy Markdown
Contributor

@Kaniska244 Kaniska244 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Set moby: false for resolute test. As of now, moby isn't supported by ubuntu resolute.

Agent-Logs-Url: https://github.com/devcontainers/features/sessions/ce62c78c-ff28-4766-bd7f-2b5a57a349ec

Co-authored-by: Kaniska244 <186041440+Kaniska244@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 5, 2026

@copilot Set moby: false for resolute test. As of now, moby isn't supported by ubuntu resolute.

Set moby: false for the resolute test scenario in ab61fec.

Copilot AI requested a review from Kaniska244 May 5, 2026 08:56
@Kaniska244
Copy link
Copy Markdown
Contributor

@copilot Note down this exceptional behavior for ubuntu resolute in the feature documentation.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 5, 2026

@copilot Note down this exceptional behavior for ubuntu resolute in the feature documentation.

Added a note in src/docker-in-docker/NOTES.md documenting that Ubuntu 26.04 (Resolute) requires moby: false and automatically falls back to iptables-nft due to lack of legacy iptables kernel support. See 75d23c2.

@Kaniska244 Kaniska244 marked this pull request as ready for review May 5, 2026 09:43
@Kaniska244 Kaniska244 requested a review from a team as a code owner May 5, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docker-in-docker feature not working on Ubuntu 26.04

2 participants