Self-hosted workflows for coding-agent delivery. Orchestrate CodeBuddy, Codex and Claude Code with scripts and human approval gates. Includes Local workflows for coding assistants.
JavaScript agent-orchestrationagentic-workflowai-agentsai-codingclaude-codecode-reviewcodebuddycodexcoding-agentscursordeveloper-toolshuman-on-the-loopllmmcpmulti-agentsdlcself-hostedsopworkflow-automationworkflow-engine
fix: let Codex and Claude Code roles work in Docker sandboxes; label installer addresses (#105)
cocofhuad5300a1a901
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 663b84e3..814da569 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,6 +2,13 @@Platform releases use `vX.Y.Z` tags and publish `ghcr.io/tencent/loopforge`. LoopForge Local packages use `local-vX.Y.Z` tags and are published by manually running the `release-local` workflow.+## 0.3.3 — Codex and Claude Code roles in Docker sandboxes++- Codex SOP roles in Docker sandboxes run with `--sandbox danger-full-access`: the container is the isolation boundary, and Codex's own bubblewrap sandbox cannot create namespaces inside it, so every shell command, file write and `submit_gate_result` call failed.+- Claude Code SOP roles run with `--permission-mode bypassPermissions` (as CodeBuddy roles already did) instead of `dontAsk`, which denied every file write, shell command and the gate tool. Docker sandboxes set `IS_SANDBOX=1`, without which Claude Code refuses that mode as root.+- The installer labels the addresses it prints (public, LAN, this machine) and reads the public IP from the cloud provider's link-local metadata service, so a cloud host behind NAT no longer shows only its private address.+- The 0.3.0 and 0.3.1 images were republished without Claude Code.+## 0.3.2 — Claude Code installed on first use- Published images no longer bundle Claude Code, which is proprietary. The first Main Bot conversation or SOP role that selects it installs the pinned `@anthropic-ai/[email protected]` from npm into `$LOOPFORGE_DATA_DIR/cli`; Docker sandboxes from the platform image read it through a read-only mount. That first use waits for the download (about a minute); later runs reuse it. Codex and CodeBuddy remain bundled.diff --git a/compose.yaml b/compose.yamlindex 596baa32..7c301c1c 100644--- a/compose.yaml+++ b/compose.yaml@@ -21,7 +21,7 @@ services:profiles: [platform]# Published release stack: never builds. Bump the pinned tag (here and in# AGENTFLOW_ISOLATED_IMAGE) with each release; source builds use compose.dev.yaml.- image: ${LOOPFORGE_IMAGE:-ghcr.io/tencent/loopforge:0.3.2}+ image: ${LOOPFORGE_IMAGE:-ghcr.io/tencent/loopforge:0.3.3}ports:- "${LOOPFORGE_BIND:-0.0.0.0}:${AGENTFLOW_HTTP_PORT:-8090}:8080"environment:@@ -40,7 +40,7 @@ services:AGENTFLOW_PLATFORM_MCP_URL: ${AGENTFLOW_PLATFORM_MCP_URL:-http://platform:8080}AGENTFLOW_DOCKER_NETWORK: ${COMPOSE_PROJECT_NAME:-loopforge}_defaultAGENTFLOW_LOCAL_SANDBOX: docker- AGENTFLOW_ISOLATED_IMAGE: ${LOOPFORGE_IMAGE:-ghcr.io/tencent/loopforge:0.3.2}+ AGENTFLOW_ISOLATED_IMAGE: ${LOOPFORGE_IMAGE:-ghcr.io/tencent/loopforge:0.3.3}HOME: ${LOOPFORGE_DATA_DIR:?Run scripts/configure.sh first}/homeAGENTFLOW_RUNNER_BINARY: /app/bin/agentflow-runner-{os}-{arch}AGENTFLOW_GATE_MCP_BINARY: /app/bin/agentflow-gate-mcp-{os}-{arch}diff --git a/docs/deployment.md b/docs/deployment.mdindex 870cdf78..05217ae4 100644--- a/docs/deployment.md+++ b/docs/deployment.md@@ -36,7 +36,7 @@ The installer checks Docker, Compose and Python (and offers to install Docker whRun it as the installation owner, including an ordinary Linux user. If that user cannot access Docker directly, the installer validates sudo and uses `sudo -n docker` consistently for Compose, schema installation and seeds. Before each operation it checks whether sudo credentials expired during a long build, prompting again in a terminal or failing with instructions in unattended mode. It does not require adding the user to the Docker group or logging out. For unattended installations run `sudo -v` first; `LOOPFORGE_YES=1` accepts installation prompts but does not bypass operating-system permissions. Without sudo or Docker access it fails immediately with instructions. Rootless Docker uses its active context's Unix socket; remote Docker contexts need a separately configured deployment because sandbox workspaces are local bind mounts.-`compose.yaml` is the published-image stack and never builds: `./start.sh`, `scripts/install.sh` and a plain `docker compose --profile platform up` all pull the GHCR release pinned there (currently `ghcr.io/tencent/loopforge:0.3.2`). The pin matches the checkout's migrations and seeds, so check out a release tag when you install. Set `LOOPFORGE_IMAGE` (for example to an `@sha256:` digest) only to override it; a value saved in `.env` takes precedence over later pin changes.+`compose.yaml` is the published-image stack and never builds: `./start.sh`, `scripts/install.sh` and a plain `docker compose --profile platform up` all pull the GHCR release pinned there (currently `ghcr.io/tencent/loopforge:0.3.3`). The pin matches the checkout's migrations and seeds, so check out a release tag when you install. Set `LOOPFORGE_IMAGE` (for example to an `@sha256:` digest) only to override it; a value saved in `.env` takes precedence over later pin changes.`./start.sh dev` (or `LOOPFORGE_BUILD_FROM_SOURCE=1 bash scripts/install.sh`) builds this checkout as `loopforge-platform:local` from `compose.dev.yaml`. It saves `COMPOSE_FILE=compose.yaml:compose.dev.yaml` in `.env`, so later runs and plain `docker compose` commands keep using the source build until `./start.sh release`. Source builds reuse npm, Go module and Go compiler caches.@@ -46,7 +46,7 @@ Open the platform and create the first account in the browser; it receives platfDuring initial setup, restrict the cloud security group or firewall to the operator's IP. Do not expose the first-account setup page to arbitrary Internet clients before the administrator account has been created.-The platform listens on `LOOPFORGE_BIND`, `0.0.0.0` by default, without prompting for an access URL. The installer prints detected host addresses, which may be private behind a cloud NAT; open the public IP instead. `LOOPFORGE_PUBLIC_URL` is optional and only changes the printed address. Allow the HTTP port in the cloud security group/firewall, or use an HTTPS reverse proxy. Existing `.env` files are preserved; older installations without a bind setting now also listen on `0.0.0.0`. Local-only installations can set `LOOPFORGE_BIND=127.0.0.1`. Proxy WebSocket and streaming requests. Set `AGENTFLOW_SECURE_COOKIES=true` when HTTPS terminates at the proxy. Keep `AGENTFLOW_SESSION_SECRET` stable across API instances and restarts.+The platform listens on `LOOPFORGE_BIND`, `0.0.0.0` by default, without prompting for an access URL. The installer prints the public, LAN and local addresses; on Tencent Cloud, Alibaba Cloud, AWS, GCP and Azure it reads the public IP from the provider's link-local metadata service, and elsewhere behind NAT you open the public IP yourself. `LOOPFORGE_PUBLIC_URL` is optional and only changes the printed address. Allow the HTTP port in the cloud security group/firewall, or use an HTTPS reverse proxy. Existing `.env` files are preserved; older installations without a bind setting now also listen on `0.0.0.0`. Local-only installations can set `LOOPFORGE_BIND=127.0.0.1`. Proxy WebSocket and streaming requests. Set `AGENTFLOW_SECURE_COOKIES=true` when HTTPS terminates at the proxy. Keep `AGENTFLOW_SESSION_SECRET` stable across API instances and restarts.### Docker sandboxesdiff --git a/internal/runtime/provider_claude.go b/internal/runtime/provider_claude.goindex 71bdfba4..8f57499c 100644--- a/internal/runtime/provider_claude.go+++ b/internal/runtime/provider_claude.go@@ -60,6 +60,9 @@ func (claudeProvider) Prepare(in providerInvocation) (CommandSpec, error) {argv = dropArgWithValue(argv, "--resume")argv = isolateClaudeFlags(argv, filepath.ToSlash(filepath.Join(in.Compiled.AgentRoot, "agent-system.md")))argv = appendEffortArgs(argv, in.Executor.Effort)+ // An unattended node must write files and call submit_gate_result; dontAsk+ // denies every tool that is not explicitly allowlisted.+ argv = append(dropArgWithValue(argv, "--permission-mode"), "--permission-mode", "bypassPermissions")// Current Claude Code releases require --verbose when print mode emits// stream-json. It is harmless for other print-mode output formats and keeps// older persisted executor definitions working after a CLI upgrade.@@ -75,7 +78,13 @@ func (claudeProvider) Prepare(in providerInvocation) (CommandSpec, error) {if sessionID := strings.TrimSpace(in.Options.ResumeSessionID); sessionID != "" {argv = append(argv, "--resume", sessionID)}- return CommandSpec{Argv: append(argv, positionalPrompt(in)), Provider: "claude-code", CredentialBindings: []CredentialBinding{BindClaudeCode, BindGit, BindMCP}, PrivateHome: true}, nil+ spec := CommandSpec{Argv: append(argv, positionalPrompt(in)), Provider: "claude-code", CredentialBindings: []CredentialBinding{BindClaudeCode, BindGit, BindMCP}, PrivateHome: true}+ if in.Driver == "docker" {+ // Sandbox containers run as root, where Claude Code refuses+ // bypassPermissions unless told the container is the sandbox.+ spec.environment = map[string]string{"IS_SANDBOX": "1"}+ }+ return spec, nil}func (claudeProvider) Protocol(ex domain.ExecutorDefinition, sink EventSink) *protocolAdapter {diff --git a/internal/runtime/provider_codex.go b/internal/runtime/provider_codex.goindex 690114f9..1eaf6777 100644--- a/internal/runtime/provider_codex.go+++ b/internal/runtime/provider_codex.go@@ -37,6 +37,12 @@ func (codexProvider) Prepare(in providerInvocation) (CommandSpec, error) {}}}+ if in.Driver == "docker" {+ // The container is the isolation boundary. Codex's own bubblewrap sandbox+ // cannot create user namespaces inside it, which fails every shell command,+ // file write and MCP call (including submit_gate_result).+ argv = withCodexSandboxMode(argv, "danger-full-access")+ }if sessionID := strings.TrimSpace(in.Options.ResumeSessionID); sessionID != "" {// `resume` is a subcommand of `codex exec`; all exec options must precede it.argv = append(argv, "resume", sessionID)@@ -58,6 +64,20 @@ func dropCodexResumeArgs(argv []string) []string {return argv}+func withCodexSandboxMode(argv []string, mode string) []string {+ out := make([]string, 0, len(argv)+2)+ for i := 0; i < len(argv); i++ {+ switch arg := argv[i]; {+ case arg == "--sandbox" || arg == "-s":+ i+++ case strings.HasPrefix(arg, "--sandbox="):+ default:+ out = append(out, arg)+ }+ }+ return append(out, "--sandbox", mode)+}+func codexHasReasoningEffort(argv []string) bool {for _, arg := range argv {if strings.Contains(arg, "model_reasoning_effort") {diff --git a/internal/runtime/runtime_test.go b/internal/runtime/runtime_test.goindex e37f7f3d..bd40c09a 100644--- a/internal/runtime/runtime_test.go+++ b/internal/runtime/runtime_test.go@@ -2037,6 +2037,44 @@ func TestIsolateClaudeFlagsUsesHostUserSettings(t *testing.T) {}}+func TestCodexInDockerUsesTheContainerAsItsSandbox(t *testing.T) {+ for driver, want := range map[string]string{"docker": "danger-full-access", "bwrap": "workspace-write", "local": "workspace-write"} {+ ex := domain.ExecutorDefinition{Kind: "codex", Binary: "codex", Args: []string{"exec", "--json", "--sandbox", "workspace-write", "--skip-git-repo-check"}}+ command, err := PrepareProviderCommand(ex, "probe", driver, InvocationOptions{ResumeSessionID: "thread-1"})+ if err != nil {+ t.Fatal(err)+ }+ sandboxes := 0+ for _, arg := range command.Argv {+ if arg == "--sandbox" {+ sandboxes+++ }+ }+ if sandboxes != 1 || !containsArgPair(command.Argv, "--sandbox", want) {+ t.Fatalf("%s: want a single --sandbox %s: %v", driver, want, command.Argv)+ }+ if n := len(command.Argv); n < 3 || command.Argv[n-3] != "resume" || command.Argv[n-1] != "probe" {+ t.Fatalf("%s: resume and prompt must stay last: %v", driver, command.Argv)+ }+ }+}++func TestClaudeNodesCanUseToolsUnattended(t *testing.T) {+ for _, driver := range []string{"docker", "bwrap", "local"} {+ ex := domain.ExecutorDefinition{Kind: "claude-code", Binary: "claude", Args: []string{"-p", "--output-format", "stream-json", "--permission-mode", "dontAsk"}}+ command, err := PrepareProviderCommand(ex, "probe", driver, InvocationOptions{})+ if err != nil {+ t.Fatal(err)+ }+ if containsArg(command.Argv, "dontAsk") || !containsArgPair(command.Argv, "--permission-mode", "bypassPermissions") {+ t.Fatalf("%s: want bypassPermissions only: %v", driver, command.Argv)+ }+ if got, want := command.environment["IS_SANDBOX"], map[bool]string{true: "1"}[driver == "docker"]; got != want {+ t.Fatalf("%s: IS_SANDBOX=%q, want %q", driver, got, want)+ }+ }+}+func TestExecutorRunnerAppliesDriverSpecificUserConfigPolicy(t *testing.T) {tests := []struct {name stringdiff --git a/scripts/install-address.py b/scripts/install-address.pyindex 8c60042b..e2aa23ea 100644--- a/scripts/install-address.py+++ b/scripts/install-address.py@@ -1,11 +1,25 @@import ipaddressimport osimport socket+import queueimport sysimport shlex+import threading+import time+import urllib.requestfrom pathlib import Pathfrom urllib.parse import urlsplit+# Link-local cloud metadata services: a NAT-ed cloud host's own interfaces only+# carry its private address. Nothing is sent outside the provider's network.+PUBLIC_IPV4_METADATA = (+ ('http://169.254.0.23/latest/meta-data/public-ipv4', {}), # Tencent Cloud+ ('http://100.100.100.200/latest/meta-data/eipv4', {}), # Alibaba Cloud+ ('http://169.254.169.254/latest/meta-data/public-ipv4', {'aws-token': ''}), # AWS+ ('http://169.254.169.254/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip', {'Metadata-Flavor': 'Google'}),+ ('http://169.254.169.254/metadata/instance/network/interface/0/ipv4/ipAddress/0/publicIpAddress?api-version=2021-02-01&format=text', {'Metadata': 'true'}), # Azure+)+def container_host():if Path('/.dockerenv').exists() or Path('/run/.containerenv').exists():@@ -16,7 +30,55 @@ def container_host():return False-def access_addresses(port, environ=os.environ):+def global_ipv4(text):+ try:+ address = ipaddress.ip_address(text.strip())+ except ValueError:+ return ''+ return str(address) if address.version == 4 and address.is_global else ''+++def metadata_public_ipv4(url, headers, timeout=1):+ opener = urllib.request.build_opener(urllib.request.ProxyHandler({}))+ headers = dict(headers)+ if 'aws-token' in headers:+ del headers['aws-token']+ token = urllib.request.Request('http://169.254.169.254/latest/api/token', method='PUT', headers={'X-aws-ec2-metadata-token-ttl-seconds': '60'})+ with opener.open(token, timeout=timeout) as response:+ headers['X-aws-ec2-metadata-token'] = response.read(256).decode()+ with opener.open(urllib.request.Request(url, headers=headers), timeout=timeout) as response:+ return global_ipv4(response.read(64).decode(errors='replace'))+++def detect_public_ipv4(timeout=1.5):+ answers = queue.Queue()++ def probe(url, headers):+ try:+ answers.put(metadata_public_ipv4(url, headers))+ except Exception:+ answers.put('')++ # Daemon threads: probes of other providers' unreachable addresses must not delay exit.+ for url, headers in PUBLIC_IPV4_METADATA:+ threading.Thread(target=probe, args=(url, headers), daemon=True).start()+ deadline = time.monotonic() + timeout+ for _ in PUBLIC_IPV4_METADATA:+ try:+ answer = answers.get(timeout=max(0, deadline - time.monotonic()))+ except queue.Empty:+ break+ if answer:+ return answer+ return ''+++def url_for(host, port):+ return f'http://[{host}]:{port}' if ':' in host else f'http://{host}:{port}'+++def access_addresses(port, environ=os.environ, public_ip=''):+ """Return ([(label, url)], note) for the addresses users can open."""bind = environ.get('LOOPFORGE_BIND', '0.0.0.0')public = environ.get('LOOPFORGE_PUBLIC_URL', '').rstrip('/')if public:@@ -33,11 +95,10 @@ def access_addresses(port, environ=os.environ):if (parsed.hostname == 'localhost' or address and address.is_loopback) and bind not in ('127.0.0.1', 'localhost', '::1'):raise ValueError('Team access cannot use localhost/127.0.0.1; enter the server IP/domain users visit')if bind in ('127.0.0.1', 'localhost', '::1'):- return [public], 'Loopback binding: the public URL requires a reverse proxy on this server.'- return [public], 'Allow the service port in the cloud security group/firewall, or route it through your HTTPS reverse proxy.'+ return [('Access', public)], 'Loopback binding: the public URL requires a reverse proxy on this server.'+ return [('Access', public)], 'Allow the service port in the cloud security group/firewall, or route it through your HTTPS reverse proxy.'if bind in ('127.0.0.1', 'localhost', '::1'):- host = f'[{bind}]' if ':' in bind else bind- return [f'http://{host}:{port}'], 'Local access only. Set LOOPFORGE_BIND=0.0.0.0 and LOOPFORGE_PUBLIC_URL in .env for team access.'+ return [('This machine', url_for(bind, port))], 'Local access only. Set LOOPFORGE_BIND=0.0.0.0 and LOOPFORGE_PUBLIC_URL in .env for team access.'if container_host():return [], 'Installation is inside a container; open the host IP and published port.'if bind not in ('0.0.0.0', '::', '[::]'):@@ -55,8 +116,14 @@ def access_addresses(port, environ=os.environ):except OSError:passhosts = list(dict.fromkeys(host for host in hosts if not ipaddress.ip_address(host).is_loopback and not ipaddress.ip_address(host).is_unspecified and not ipaddress.ip_address(host).is_link_local))- addresses = [f'http://[{host}]:{port}' if ':' in host else f'http://{host}:{port}' for host in hosts]- return addresses, 'On cloud hosts behind NAT, open the public IP instead and allow the port in the security group/firewall.'+ public_hosts = list(dict.fromkeys(([public_ip] if public_ip else []) + [host for host in hosts if ipaddress.ip_address(host).is_global]))+ entries = [('Public', url_for(host, port)) for host in public_hosts]+ entries += [('LAN', url_for(host, port)) for host in hosts if host not in public_hosts]+ if bind in ('0.0.0.0', '::', '[::]'):+ entries.append(('This machine', url_for('localhost', port)))+ if public_hosts:+ return entries, f'Allow TCP {port} in the cloud security group/firewall so the public address is reachable.'+ return entries, f'No public IP detected. On a cloud host, open http://<public IP>:{port} and allow TCP {port} in the security group/firewall.'def prepare_address(port, environ=os.environ):@@ -81,10 +148,12 @@ if __name__ == '__main__':except (ValueError, EOFError) as error:sys.exit(str(error))sys.exit(0)- addresses, note = access_addresses(sys.argv[1])+ detect = not os.environ.get('LOOPFORGE_PUBLIC_URL') and os.environ.get('LOOPFORGE_BIND', '0.0.0.0') in ('0.0.0.0', '::', '[::]') and not container_host()+ addresses, note = access_addresses(sys.argv[1], public_ip=detect_public_ipv4() if detect else '')print('\n✓ LoopForge is running')- for address in addresses:- print(f' {"Access" if os.environ.get("LOOPFORGE_PUBLIC_URL") else "Server address (may be LAN-only)"}: {address}')+ width = max((len(label) for label, _ in addresses), default=0)+ for label, address in addresses:+ print(f' {label + ":":<{width + 1}} {address}')if not addresses:print(f' Listening on {os.environ.get("LOOPFORGE_BIND", "0.0.0.0")}:{sys.argv[1]}; open http://SERVER_IP:{sys.argv[1]}.')print(f' {note}')diff --git a/scripts/test-install.py b/scripts/test-install.pyindex 8b8d0647..2623fe2f 100644--- a/scripts/test-install.py+++ b/scripts/test-install.py@@ -6,6 +6,7 @@ from pathlib import Pathimport shutilimport subprocessimport tempfile+import threadingimport timeimport unittestfrom unittest.mock import patch@@ -187,20 +188,45 @@ exec "$@"class AddressTests(unittest.TestCase):def test_public_url_and_loopback_proxy(self):urls, note = address.access_addresses('8090', {'LOOPFORGE_BIND': '127.0.0.1', 'LOOPFORGE_PUBLIC_URL': 'https://team.example.test/'})- self.assertEqual(urls, ['https://team.example.test'])+ self.assertEqual(urls, [('Access', 'https://team.example.test')])self.assertIn('reverse proxy', note)def test_ipv6_and_local_mode(self):- self.assertEqual(address.access_addresses('8090', {'LOOPFORGE_BIND': '2001:db8::1'})[0], ['http://[2001:db8::1]:8090'])- urls, note = address.access_addresses('8090', {'LOOPFORGE_BIND': '127.0.0.1'})- self.assertEqual(urls, ['http://127.0.0.1:8090'])+ with patch.object(address, 'container_host', return_value=False):+ self.assertEqual(address.access_addresses('8090', {'LOOPFORGE_BIND': '2001:db8::1'})[0], [('LAN', 'http://[2001:db8::1]:8090')])+ urls, note = address.access_addresses('8090', {'LOOPFORGE_BIND': '127.0.0.1'})+ self.assertEqual(urls, [('This machine', 'http://127.0.0.1:8090')])self.assertIn('Local access only', note)- def test_cloud_address_is_not_claimed_to_be_public(self):- with patch.object(address, 'container_host', return_value=False), patch.object(address.socket, 'socket', side_effect=OSError), patch.object(address.socket, 'gethostbyname_ex', return_value=('host', [], ['127.0.0.1', '192.168.1.2'])):+ def interfaces(self, *hosts):+ return patch.object(address.socket, 'gethostbyname_ex', return_value=('host', [], ['127.0.0.1', *hosts]))++ def test_private_address_is_labelled_lan_without_a_detected_public_ip(self):+ with patch.object(address, 'container_host', return_value=False), patch.object(address.socket, 'socket', side_effect=OSError), self.interfaces('10.0.0.126'):urls, note = address.access_addresses('8090', {})- self.assertEqual(urls, ['http://192.168.1.2:8090'])- self.assertIn('NAT', note)+ self.assertEqual(urls, [('LAN', 'http://10.0.0.126:8090'), ('This machine', 'http://localhost:8090')])+ self.assertIn('No public IP detected', note)++ def test_detected_public_ip_comes_first(self):+ with patch.object(address, 'container_host', return_value=False), patch.object(address.socket, 'socket', side_effect=OSError), self.interfaces('10.0.0.126'):+ urls, note = address.access_addresses('8090', {}, public_ip='43.160.231.118')+ self.assertEqual(urls, [('Public', 'http://43.160.231.118:8090'), ('LAN', 'http://10.0.0.126:8090'), ('This machine', 'http://localhost:8090')])+ self.assertIn('security group', note)++ def test_metadata_answers_must_be_global_ipv4(self):+ self.assertEqual(address.global_ipv4(' 43.160.231.118\n'), '43.160.231.118')+ for answer in ('10.0.0.126', '<html>404</html>', '', '2001:4860::1'):+ self.assertEqual(address.global_ipv4(answer), '')++ def test_public_ip_detection_is_bounded(self):+ def hang(url, headers):+ threading.Event().wait(5)+ with patch.object(address, 'metadata_public_ipv4', side_effect=hang):+ started = time.monotonic()+ self.assertEqual(address.detect_public_ipv4(timeout=0.2), '')+ self.assertLess(time.monotonic() - started, 1)+ with patch.object(address, 'metadata_public_ipv4', side_effect=lambda url, headers: '43.160.231.118' if '169.254.0.23' in url else ''):+ self.assertEqual(address.detect_public_ipv4(), '43.160.231.118')def test_container_does_not_publish_its_bridge_address(self):with patch.object(address, 'container_host', return_value=True):