1
0
mirror of synced 2025-12-30 03:01:36 -05:00
Files
docs/data/reusables/codespaces/port-forwarding-adding-non-jetbrains.md
hubwriter dfab0d1601 Changes from JetBrains PR
These are the changes in the pre-review version of PR:
https://github.com/github/docs-internal/pull/29794

This version of the Codespaces docs forms the base for
the Universe megabranch.
2022-10-06 12:48:44 +01:00

1.2 KiB

Adding a port to the codespace configuration

You can add a forwarded port to the {% data variables.product.prodname_github_codespaces %} configuration for the repository, so the port will automatically be forwarded for all codespaces created from the repository. After you update the configuration, any previously created codespaces must be rebuilt for the change to apply. For more information, see "Introduction to dev containers."

You can manually configure forwarded ports in a .devcontainer.json file using the forwardPorts property, or you can use the "Ports" panel in a codespace that you've opened in the browser or the {% data variables.product.prodname_vscode_shortname %} desktop application.

{% data reusables.codespaces.navigate-to-ports-tab %}

  1. Right click the port you want to add to the codespace configuration, then click Set Label and Update devcontainer.json. Option to set label and add port to devcontainer.json in the right-click menu {% data reusables.codespaces.type-port-label %}