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
4 changes: 4 additions & 0 deletions .github/workflows/test-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ jobs:
baseImage: ubuntu:jammy
- features: oryx
baseImage: mcr.microsoft.com/devcontainers/base:ubuntu
- features: docker-in-docker
baseImage: mcr.microsoft.com/devcontainers/base:debian
- features: docker-outside-of-docker
baseImage: mcr.microsoft.com/devcontainers/base:debian
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 2 additions & 0 deletions src/docker-in-docker/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ This docker-in-docker Dev Container Feature is roughly based on the [official do

This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed.

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

`bash` is required to execute the `install.sh` script.
2 changes: 1 addition & 1 deletion src/docker-in-docker/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "docker-in-docker",
"version": "2.12.3",
"version": "2.12.4",
"name": "Docker (Docker-in-Docker)",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-in-docker",
"description": "Create child containers *inside* a container, independent from the host's docker instance. Installs Docker extension in the container along with needed CLIs.",
Expand Down
7 changes: 7 additions & 0 deletions src/docker-in-docker/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,13 @@ export DEBIAN_FRONTEND=noninteractive
# 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."
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

# Check if distro is supported
if [ "${USE_MOBY}" = "true" ]; then
if [[ "${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}" != *"${VERSION_CODENAME}"* ]]; then
Expand Down
2 changes: 2 additions & 0 deletions src/docker-outside-of-docker/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@ services:

This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed.

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

`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,6 +1,6 @@
{
"id": "docker-outside-of-docker",
"version": "1.6.4",
"version": "1.6.5",
"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
7 changes: 7 additions & 0 deletions src/docker-outside-of-docker/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@ 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."
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

# Check if distro is supported
if [ "${USE_MOBY}" = "true" ]; then
if [[ "${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}" != *"${VERSION_CODENAME}"* ]]; then
Expand Down
7 changes: 5 additions & 2 deletions test/docker-in-docker/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"docker-in-docker": {
"version": "26.1.4",
"version": "28.4.0",
"moby": "false",
"mobyBuildxVersion": "latest",
"dockerDashComposeVersion": "none",
Expand All @@ -170,7 +170,10 @@
"docker_with_on_create_command": {
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"docker-in-docker": {}
"docker-in-docker": {
"version": "latest",
"moby": "false"
}
},
"remoteUser": "vscode",
"onCreateCommand": "docker ps && sleep 5s && docker ps"
Expand Down