You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coder supports port forwarding for dev containers through the following mechanisms:
50
62
51
-
> [!NOTE]
52
-
>
53
-
> Support for automatic port forwarding via the `forwardPorts` property in
54
-
> `devcontainer.json` is planned for a future release.
63
+
1. **Defined Ports**: Ports defined in your `devcontainer.json` file via the [`appPort`](https://containers.dev/implementors/json_reference/#image-specific) property.
64
+
65
+
1. **Dynamic Ports**: For ports not defined in your `devcontainer.json`, you can use the Coder CLI to forward them:
This forwards port 8080 (local) → 8080 (container) and port 4000 (local) → 3000 (container).
72
86
73
87
## Dev Container Features
74
88
75
-
You can use standard dev container features in your `devcontainer.json` file.
76
-
Coder also maintains a
77
-
[repository of features](https://github.com/coder/devcontainer-features) to
78
-
enhance your development experience.
89
+
Dev container features allow you to enhance your development environment with pre-configured tooling.
90
+
91
+
Coder supports the standard [dev container features specification](https://containers.dev/implementors/features/), allowing you to use any compatible features in your `devcontainer.json` file.
79
92
80
-
Currently available features include [code-server](https://github.com/coder/devcontainer-features/blob/main/src/code-server).
93
+
### Example: Add code-server
81
94
82
-
To use the code-server feature, add the following to your `devcontainer.json`:
95
+
Coder maintains a [repository of features](https://github.com/coder/devcontainer-features) designed specifically for Coder environments.
96
+
97
+
To add code-server (VS Code in the browser), add this to your `devcontainer.json`:
83
98
84
99
```json
85
100
{
@@ -93,7 +108,30 @@ To use the code-server feature, add the following to your `devcontainer.json`:
93
108
}
94
109
```
95
110
96
-
> [!NOTE]
97
-
>
98
-
> Remember to include the port in the `appPort` section to ensure proper port
99
-
> forwarding.
111
+
After rebuilding your container, code-server will be available on the configured port.
112
+
113
+
### Using Multiple Features
114
+
115
+
You can combine multiple features in a single `devcontainer.json`:
0 commit comments