@@ -5,6 +5,8 @@ visual representation of the running environment:
5
5
6
6
![ Dev container integration in Coder dashboard] ( ../../images/user-guides/devcontainers/devcontainer-agent-ports.png )
7
7
8
+ This page assumes you have a[ dev containers integration] ( ./index.md ) ready.
9
+
8
10
##SSH Access
9
11
10
12
You can SSH into your dev container directly using the Coder CLI:
@@ -42,31 +44,15 @@ work.
42
44
43
45
##Port Forwarding
44
46
45
- During the early access phase, port forwarding is limited to ports defined via
46
- [ ` appPort ` ] ( https://containers.dev/implementors/json_reference/#image-specific )
47
- in your` devcontainer.json ` file.
48
-
49
- > [ !NOTE]
50
- >
51
- > Support for automatic port forwarding via the` forwardPorts ` property in
52
- > ` devcontainer.json ` is planned for a future release.
53
-
54
- For example, with this` devcontainer.json ` configuration:
55
-
56
- ``` json
57
- {
58
- "appPort" : [" 8080:8080" ," 4000:3000" ]
59
- }
60
- ```
61
-
62
- You can forward these ports to your local machine using:
47
+ Coder automatically forwards any port declared in` appPort ` ,` forwardPorts ` ,
48
+ or exposed by` docker-compose.yml ` .
49
+ Use the dashboard to open a forwarded port, or the CLI:
63
50
64
51
``` console
65
52
coder port-forward my-workspace --tcp 8080,4000
66
53
```
67
54
68
- This forwards port 8080 (local) -> 8080 (agent) -> 8080 (dev container) and port
69
- 4000 (local) -> 4000 (agent) -> 3000 (dev container).
55
+ If you need a port that isn’t declared, pass it explicitly to` coder port-forward ` .
70
56
71
57
##Dev Container Features
72
58