Multiple devcontainer.json files & advanced codespace creation options (GA) (#26708)
This commit is contained in:
@@ -72,19 +72,53 @@ If you would like to create a codespace for a repository owned by your personal
|
||||
{% webui %}
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
2. Under the repository name, use the "Branch" drop-down menu, and select the branch you want to create a codespace for.
|
||||
1. Under the repository name, use the "Branch" drop-down menu, and select the branch you want to create a codespace for.
|
||||
|
||||

|
||||
|
||||
3. Under the repository name, use the **{% octicon "code" aria-label="The code icon" %} Code** drop-down menu, and in the **Codespaces** tab, click {% octicon "plus" aria-label="The plus icon" %} **New codespace**.
|
||||
1. Click the **{% octicon "code" aria-label="The code icon" %} Code** button, then click the **Codespaces** tab.
|
||||
|
||||

|
||||
|
||||
If you are a member of an organization and are creating a codespace on a repository owned by that organization, you can select the option of a different machine type. From the dialog box, choose a machine type and then click **Create codespace**.
|
||||
1. Create your codespace, either using the default options, or after configuring advanced options:
|
||||
|
||||
* **Use the default options**
|
||||
|
||||

|
||||
To create a codespace using the default options, click **Create codespace on BRANCH**.
|
||||
|
||||
{% data reusables.codespaces.codespaces-machine-type-availability %}
|
||||
Optionally, before clicking **Create codespace on BRANCH**, you can click the down arrow at the side of the button to see what machine type will be used for your codespace.
|
||||
|
||||

|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: The machine type with the lowest resources that are valid for the repository is selected by default.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
* **Configure options**
|
||||
|
||||
To configure advanced options for your codespace, such as a different machine type or a particular `devcontainer.json` file:
|
||||
|
||||
1. Click the down arrow at the side of the **Create codespace on BRANCH** button, then click **Configure and create codespace**.
|
||||
1. Click the **Configure and create codespace** button.
|
||||
1. On the options page for your codespace, choose your preferred options from the drop-down menus.
|
||||
|
||||

|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes**
|
||||
|
||||
* You can bookmark the options page to give you a quick way to create a codespace for this repository and branch.
|
||||
* The [https://github.com/codespaces/new](https://github.com/codespaces/new) page provides a quick way to create a codespace for any repository and branch.
|
||||
* For more information about the `devcontainer.json` file, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#devcontainerjson)."
|
||||
* For more information about machine types, see "[Changing the machine type for your codespace](/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace#about-machine-types)."
|
||||
* {% data reusables.codespaces.codespaces-machine-type-availability %}
|
||||
|
||||
{% endnote %}
|
||||
|
||||
1. Click **Start session**.
|
||||
|
||||
{% endwebui %}
|
||||
|
||||
@@ -106,6 +140,12 @@ gh codespace create
|
||||
|
||||
You are prompted to choose a repository, a branch, and a machine type (if more than one is available).
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: Currently, {% data variables.product.prodname_cli %} doesn't allow you to choose a dev container configuration when you create a codespace. If you want to choose a specific dev container configuration, use the {% data variables.product.prodname_dotcom %} web interface to create your codespace. For more information, click the "Web browser" tab at the top of this page.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
Alternatively, you can use flags to specify some or all of the options:
|
||||
|
||||
```shell
|
||||
|
||||
Reference in New Issue
Block a user