Skip to content

Commit 7b59ca9

Browse files
Test with module ip_tables
1 parent ee2ed47 commit 7b59ca9

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
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 legacy" bash -c "iptables --version | grep legacy"
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
@@ -167,6 +167,15 @@
167167
},
168168
"initializeCommand": "sudo modprobe --remove --remove-holders --wait 1000 ip_tables"
169169
},
170+
"docker_with_iptables": {
171+
"image": "mcr.microsoft.com/devcontainers/base:debian",
172+
"features": {
173+
"docker-in-docker": {
174+
"moby": "false"
175+
}
176+
},
177+
"initializeCommand": "sudo modprobe ip_tables"
178+
},
170179
// DO NOT REMOVE: This scenario is used by the docker-in-docker-stress-test workflow
171180
"docker_with_on_create_command": {
172181
"image": "mcr.microsoft.com/devcontainers/base:debian",

0 commit comments

Comments
 (0)