Skip to content

Commit 0c44deb

Browse files
authored
Add Ubuntu 26.04 (resolute) support to docker-outside-of-docker (#1656)
* Initial plan * Add Ubuntu 26.04 (resolute) support to docker-outside-of-docker - Add "resolute" to DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES - Block moby on resolute (packages not available), matching docker-in-docker behavior - Add test scenario for Ubuntu resolute with moby=false * Bump version to 1.10.0 and exclude base:ubuntu from test-pr workflow - Bump docker-outside-of-docker version from 1.9.1 to 1.10.0 - Add exclusion for docker-outside-of-docker with base:ubuntu image in test-pr workflow since moby (default) is not available on resolute * Remove trailing whitespace in test-pr.yaml * Add note about Ubuntu 26.04 requiring moby: false in NOTES.md --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent ca1c166 commit 0c44deb

6 files changed

Lines changed: 39 additions & 7 deletions

File tree

.github/workflows/test-pr.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ jobs:
6565
- features: docker-in-docker
6666
baseImage: mcr.microsoft.com/devcontainers/base:debian
6767
- features: docker-outside-of-docker
68-
baseImage: mcr.microsoft.com/devcontainers/base:debian
68+
baseImage: mcr.microsoft.com/devcontainers/base:debian
6969
- features: docker-in-docker
70-
baseImage: mcr.microsoft.com/devcontainers/base:ubuntu
70+
baseImage: mcr.microsoft.com/devcontainers/base:ubuntu
71+
- features: docker-outside-of-docker
72+
baseImage: mcr.microsoft.com/devcontainers/base:ubuntu
7173
steps:
7274
- uses: actions/checkout@v6
7375

src/docker-outside-of-docker/NOTES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,14 @@ This Feature should work on recent versions of Debian/Ubuntu-based distributions
6060

6161
Debian Trixie (13) does not include moby-cli and related system packages, so the feature cannot install with "moby": "true". To use this feature on Trixie, please set "moby": "false" or choose a different base image (for example, Ubuntu 24.04).
6262

63+
Ubuntu 26.04 LTS (Resolute) does not have moby-cli packages available, so the feature only supports installation with `"moby": false`. To use this feature on Ubuntu 26.04, set `"moby": false` in your feature configuration:
64+
65+
```json
66+
"features": {
67+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
68+
"moby": false
69+
}
70+
}
71+
```
72+
6373
`bash` is required to execute the `install.sh` script.

src/docker-outside-of-docker/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22

33
"id": "docker-outside-of-docker",
4-
"version": "1.9.1",
4+
"version": "1.10.0",
55
"name": "Docker (docker-outside-of-docker)",
66
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-outside-of-docker",
77
"description": "Re-use the host docker socket, adding the Docker CLI to a container. Feature invokes a script to enable using a forwarded Docker socket within a container to run Docker commands.",

src/docker-outside-of-docker/install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ INSTALL_DOCKER_COMPOSE_SWITCH="${INSTALLDOCKERCOMPOSESWITCH:-"true"}"
2222
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
2323
MICROSOFT_GPG_KEYS_ROLLING_URI="https://packages.microsoft.com/keys/microsoft-rolling.asc"
2424
DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="trixie bookworm buster bullseye bionic focal jammy noble plucky"
25-
DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="trixie bookworm buster bullseye bionic focal hirsute impish jammy noble plucky"
25+
DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="trixie bookworm buster bullseye bionic focal hirsute impish jammy noble plucky resolute"
2626

2727
set -e
2828

@@ -207,9 +207,9 @@ fi
207207
# Fetch host/container arch.
208208
architecture="$(dpkg --print-architecture)"
209209

210-
# Prevent attempting to install Moby on Debian trixie (packages removed)
211-
if [ "${USE_MOBY}" = "true" ] && [ "${ID}" = "debian" ] && [ "${VERSION_CODENAME}" = "trixie" ]; then
212-
err "The 'moby' option is not supported on Debian 'trixie' because 'moby-cli' and related system packages have been removed from that distribution."
210+
# Prevent attempting to install Moby on Debian trixie or Ubuntu resolute (packages not available)
211+
if [ "${USE_MOBY}" = "true" ] && ([ "${VERSION_CODENAME}" = "trixie" ] || [ "${VERSION_CODENAME}" = "resolute" ]); then
212+
err "The 'moby' option is not supported on ${ID} '${VERSION_CODENAME}' because 'moby-cli' and related system packages are not available in that distribution."
213213
err "To continue, either set the feature option '\"moby\": false' or use a different base image (for example: 'debian:bookworm' or 'ubuntu-24.04')."
214214
exit 1
215215
fi
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Import test library
6+
source dev-container-features-test-lib
7+
8+
# Definition specific tests
9+
check "docker installed" bash -c "type docker"
10+
11+
# Report results
12+
reportResults

test/docker-outside-of-docker/scenarios.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,14 @@
181181
}
182182
}
183183
},
184+
"install_on_ubuntu_resolute": {
185+
"image": "ubuntu:resolute",
186+
"features": {
187+
"docker-outside-of-docker": {
188+
"moby": false
189+
}
190+
}
191+
},
184192
"rootless_docker_socket": {
185193
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
186194
"features": {

0 commit comments

Comments
 (0)