chore(egress): setup-gates.sh — one-shot G1/G2 runner for bare Linux#158
Merged
Conversation
A one-shot runner for the v0.4.0 egress-jail release gates, meant for a WSL2 distro running native docker-ce (NOT Docker Desktop). No production file touched. scripts/setup-gates.sh: - preflight: docker present + daemon reachable + drydock repo + a native-vs-Docker Desktop check (warns that Docker Desktop's network VM can make the reachability gate a false negative while the deny-by-default block gates still hold); - build: docker build -f Dockerfile.egress -t drydock-egress:latest; - G2: runs scripts/egress-smoke.sh and explains how to read the gate table; - G1: prints the manual capture recipe (enable/collect/finalize/disable) since G1 needs real interactive drydock sessions. test/setup_gates.bats: 7 unit tests for the pure _is_docker_desktop helper (Docker Desktop substring true; native Debian/Ubuntu/empty false) + source-guard. shellcheck + shfmt clean; the 7 new tests pass. Refs #149.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A one-shot runner that bootstraps and executes the v0.4.0 egress-jail release
gates (G1 capture, G2 smoke) on a bare-Linux host — designed for a WSL2 distro
running native docker-ce, not Docker Desktop. Two new files, no production
code touched.
Why
The gates need bare-Linux Docker networking. On Docker Desktop the vpnkit network
VM can make the reachability gate a false negative; native docker-ce in a WSL2
distro reproduces bare-Linux faithfully. This script makes that run a single
command and explains how to read the results.
scripts/setup-gates.shdockerpresent + daemon reachable + drydock repo, and anative-vs-Docker-Desktop check (
_is_docker_desktop): warns that on DockerDesktop the block gates (403) are reliable but the reachability gate
(
api.anthropic.com→ 200) may be a false negative.docker build -f Dockerfile.egress -t drydock-egress:latest.scripts/egress-smoke.shand annotates the gate table.enable/collect/finalize/disablerecipe (G1needs real interactive
drydocksessions, so it is guided, not auto-run).G3 (the release) stays a separate maintainer step, only after G1/G2 pass.
Tests
test/setup_gates.bats— 7 unit tests for the pure_is_docker_desktophelper(Docker Desktop substring → true; native Debian/Ubuntu/empty → false) + a
source-guard test. shellcheck + shfmt clean; the 7 tests pass locally (the full
suite runs in CI).
Size
size:m— 235 insertions, additive tooling only, no production change. Refs #149(does not close it).