Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/test-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ jobs:
- features: docker-in-docker
baseImage: mcr.microsoft.com/devcontainers/base:debian
- features: docker-outside-of-docker
baseImage: mcr.microsoft.com/devcontainers/base:debian
baseImage: mcr.microsoft.com/devcontainers/base:debian
- features: docker-in-docker
baseImage: mcr.microsoft.com/devcontainers/base:ubuntu
baseImage: mcr.microsoft.com/devcontainers/base:ubuntu
- features: docker-outside-of-docker
baseImage: mcr.microsoft.com/devcontainers/base:ubuntu
steps:
- uses: actions/checkout@v6

Expand Down
10 changes: 10 additions & 0 deletions src/docker-outside-of-docker/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,14 @@ This Feature should work on recent versions of Debian/Ubuntu-based distributions

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).

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:

```json
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"moby": false
}
}
```

`bash` is required to execute the `install.sh` script.
2 changes: 1 addition & 1 deletion src/docker-outside-of-docker/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{

"id": "docker-outside-of-docker",
"version": "1.9.1",
"version": "1.10.0",
"name": "Docker (docker-outside-of-docker)",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-outside-of-docker",
"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.",
Expand Down
8 changes: 4 additions & 4 deletions src/docker-outside-of-docker/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ INSTALL_DOCKER_COMPOSE_SWITCH="${INSTALLDOCKERCOMPOSESWITCH:-"true"}"
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
MICROSOFT_GPG_KEYS_ROLLING_URI="https://packages.microsoft.com/keys/microsoft-rolling.asc"
DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="trixie bookworm buster bullseye bionic focal jammy noble plucky"
DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="trixie bookworm buster bullseye bionic focal hirsute impish jammy noble plucky"
DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="trixie bookworm buster bullseye bionic focal hirsute impish jammy noble plucky resolute"

set -e

Expand Down Expand Up @@ -207,9 +207,9 @@ fi
# Fetch host/container arch.
architecture="$(dpkg --print-architecture)"

# Prevent attempting to install Moby on Debian trixie (packages removed)
if [ "${USE_MOBY}" = "true" ] && [ "${ID}" = "debian" ] && [ "${VERSION_CODENAME}" = "trixie" ]; then
err "The 'moby' option is not supported on Debian 'trixie' because 'moby-cli' and related system packages have been removed from that distribution."
# Prevent attempting to install Moby on Debian trixie or Ubuntu resolute (packages not available)
if [ "${USE_MOBY}" = "true" ] && ([ "${VERSION_CODENAME}" = "trixie" ] || [ "${VERSION_CODENAME}" = "resolute" ]); then
err "The 'moby' option is not supported on ${ID} '${VERSION_CODENAME}' because 'moby-cli' and related system packages are not available in that distribution."
err "To continue, either set the feature option '\"moby\": false' or use a different base image (for example: 'debian:bookworm' or 'ubuntu-24.04')."
exit 1
fi
Expand Down
12 changes: 12 additions & 0 deletions test/docker-outside-of-docker/install_on_ubuntu_resolute.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -e

# Import test library
source dev-container-features-test-lib

# Definition specific tests
check "docker installed" bash -c "type docker"

# Report results
reportResults
8 changes: 8 additions & 0 deletions test/docker-outside-of-docker/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@
}
}
},
"install_on_ubuntu_resolute": {
"image": "ubuntu:resolute",
"features": {
"docker-outside-of-docker": {
"moby": false
}
}
},
"rootless_docker_socket": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
"features": {
Expand Down
Loading