As an admin, you can install the GitHub Copilot extension to enable AI-powered code
suggestions, and chat assistance within your dev container.
You must have performed the following tasks:
- Gained access to edit the .devopsconfig control repository.
- Have a valid GitHub account with an active GitHub Copilot subscription.
This task describes how you can configure a dev container to support GitHub Copilot,
and install and activate the extension within the running environment.
-
Configure the dev container image:
- Navigate to the .devopsconfig Control repository.
- Edit the existing devcontainer.json file (for example, within the Java
dev container configuration), and update the image property to define
the specific container version:
"image": "baravich/devcontainer-java-copilot:2.0.000"
- Commit and push the changes to the repository.
-
Launch the dev container:
- In Code, locate
the appropriate tile for the dev container configured in Step 1.
- Click the tile to launch the dev container.
-
Install the Copilot Extensions:
- You must run a script to install the necessary binaries once the
environment is running. Open a new Terminal in the dev container
environment.
- Copy and paste the following command to download and run the
installation script:
curl -fsSL https://raw.githubusercontent.com/sunpix/howto-install-copilot-in-code-server/refs/heads/main/install-copilot.sh
This script automatically installs both the GitHub Copilot and
Copilot Chat extensions.
-
Authenticate and access the Copilot:
- Locate the GitHub Copilot icon in the activity bar or status bar, once
the installation is complete.
- Select the icon and follow the prompts to sign in to your GitHub
account.
- Authorize the extension to access your subscription.
The GitHub Copilot and Chat extensions are now installed and active. You can now use AI assistance for code generation and technical questions directly within your development environment.