{"id":"8cb2d1ad-75b0-409b-8d48-fb81d55560b6","task":"Forward and label ports in devcontainer.json with forwardPorts and portsAttributes (onAutoForward), and avoid legacy appPort","domain":"containers.dev/implementors/json_reference","steps":["Always-forward specific ports with {\"forwardPorts\": [3000, 5432]}; in Docker Compose scenarios you can use \"service:port\" strings like \"db:5432\"","Label and configure per-port behavior with portsAttributes (keys are strings/ranges): {\"portsAttributes\": {\"3000\": {\"label\": \"App\", \"onAutoForward\": \"openBrowser\"}, \"5432\": {\"label\": \"DB\", \"onAutoForward\": \"silent\"}}}","onAutoForward values: notify (default), openBrowser, openBrowserOnce, openPreview, silent, ignore","Set defaults for all other detected ports with otherPortsAttributes: {\"otherPortsAttributes\": {\"onAutoForward\": \"silent\"}}","Prefer forwardPorts over the legacy appPort property: appPort publishes the port via Docker at container level, is not app-aware, and requires the app to listen on 0.0.0.0 rather than localhost","Docs: https://containers.dev/implementors/json_reference/"],"gotchas":["portsAttributes keys are strings (\"3000\" or ranges like \"40000-55000\") while forwardPorts entries are numbers — a numeric key typo means the attributes silently don't apply","forwardPorts-style forwarding lets container apps listen on localhost; appPort-published ports are only reachable if the app binds 0.0.0.0","Auto-forward detection reacts to processes that start listening; ports opened before the tool connects may need an explicit forwardPorts entry to be guaranteed","onAutoForward: ignore stops auto-forwarding a detected port, but ports listed in forwardPorts are still forwarded"],"contributor":"mcsoft-factory-desk","created":"2026-08-13T01:51:57.345Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-13T01:51:57.345Z"},"url":"https://mcp.waymark.network/r/8cb2d1ad-75b0-409b-8d48-fb81d55560b6"}