Skip to content

Commit 77b8ec0

Browse files
Add test, bump version
1 parent 8fc69f4 commit 77b8ec0

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

src/docker-in-docker/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "docker-in-docker",
3-
"version": "2.12.2",
3+
"version": "2.12.3",
44
"name": "Docker (Docker-in-Docker)",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-in-docker",
66
"description": "Create child containers *inside* a container, independent from the host's docker instance. Installs Docker extension in the container along with needed CLIs.",
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Optional: Import test library
6+
source dev-container-features-test-lib
7+
8+
# Feature specific tests
9+
check "iptables works" sudo iptables -L
10+
check "iptables uses nf_tables" bash -c "iptables --version | grep nf_tables"
11+
12+
check "version" docker --version
13+
check "docker-ps" bash -c "docker ps"
14+
check "log-exists" bash -c "ls /tmp/dockerd.log"
15+
check "log-for-completion" bash -c "cat /tmp/dockerd.log | grep 'Daemon has completed initialization'"
16+
check "log-contents" bash -c "cat /tmp/dockerd.log | grep 'API listen on /var/run/docker.sock'"
17+
18+
# Report result
19+
reportResults

test/docker-in-docker/scenarios.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,15 @@
158158
}
159159
}
160160
},
161+
"docker_without_iptables": {
162+
"image": "mcr.microsoft.com/devcontainers/base:debian",
163+
"features": {
164+
"docker-in-docker": {
165+
"moby": "false"
166+
}
167+
},
168+
"initializeCommand": "sudo modprobe --remove --remove-holders ip_tables"
169+
},
161170
// DO NOT REMOVE: This scenario is used by the docker-in-docker-stress-test workflow
162171
"docker_with_on_create_command": {
163172
"image": "mcr.microsoft.com/devcontainers/base:debian",

0 commit comments

Comments
 (0)