Skip to content

Commit 6f4a9df

Browse files
committed
Switch to a image for the dev container
1 parent 0758903 commit 6f4a9df

9 files changed

Lines changed: 41 additions & 313 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 0 additions & 122 deletions
This file was deleted.

.devcontainer/README.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Code - OSS Development Container
22

3-
This repository includes configuration for a development container for working with Code - OSS in an isolated local container or using [Visual Studio Codespaces](https://aka.ms/vso).
3+
This repository includes configuration for a development container for working with Code - OSS in an isolated local container or using [GitHub Codespaces](https://github.com/features/codespaces).
44

5-
> **Tip:** The default VNC password is `vscode`. The VNC server runs on port `5901` with a web client at `6080`. For better performance, we recommend using a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/). Applications like the macOS Screen Sharing app will not perform as well. [Chicken](https://sourceforge.net/projects/chicken/) is a good macOS alternative.
5+
> **Tip:** The default VNC password is `vscode`. The VNC server runs on port `5901` with a web client at `6080`. For better performance, we recommend using a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/). Applications like the macOS Screen Sharing app will not perform as well.
66
77
## Quick start - local
88

@@ -18,9 +18,9 @@ This repository includes configuration for a development container for working w
1818

1919
> Note that the Remote - Containers extension requires the Visual Studio Code distribution of Code - OSS. See the [FAQ](https://aka.ms/vscode-remote/faq/license) for details.
2020
21-
4. Press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> and select **Remote-Containers: Clone Repository in Container Volume...**.
21+
4. Press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> and select **Remote - Containers: Open Repository in Container...**.
2222

23-
> **Tip:** While you can use your local source tree instead, operations like `yarn install` can be slow on macOS or using the Hyper-V engine on Windows. We recommend the "clone repository in container" approach instead since it uses "named volume" rather than the local filesystem.
23+
> **Tip:** While you can use your local source tree instead, operations like `yarn install` can be slow on macOS or using the Hyper-V engine on Windows. We recommend the "open repository" approach instead since it uses "named volume" rather than the local filesystem.
2424
2525
5. Type `https://github.com/microsoft/vscode` (or a branch or PR URL) in the input box and press <kbd>Enter</kbd>.
2626

@@ -30,25 +30,41 @@ Anything you start in VS Code or the integrated terminal will appear here.
3030

3131
Next: **[Try it out!](#try-it)**
3232

33-
## Quick start - Codespaces
33+
## Quick start - GitHub Codespaces
3434

35-
>Note that the Codespaces browser-based editor cannot currently access the desktop environment in this container (due to a [missing feature](https://github.com/MicrosoftDocs/vsonline/issues/117)). We recommend using Visual Studio Code from the desktop to connect instead in the near term.
35+
> **IMPORTANT:** The current user beta for GitHub Codespaces uses a "Basic" sized codespace which is too small to run a full build of VS Code. You'll soon be able to use a "Standard" sized codespace (4-core, 8GB) that will be better suited for this purpose.
3636
37-
1. Install [Visual Studio Code Stable](https://code.visualstudio.com/) or [Insiders](https://code.visualstudio.com/insiders/) and the [Visual Studio Codespaces](https://aka.ms/vscs-ext-vscode) extension.
37+
1. From the [microsoft/vscode GitHub repository](https://github.com/microsoft/vscode), click on the **Code** dropdown, select **Open with Codespaces**, and the **New codespace**
3838

39-
![Image of VS Codespaces extension](https://microsoft.github.io/vscode-remote-release/images/codespaces-extn.png)
39+
> Note that you will not see these options if you are not in the beta yet.
4040
41-
> Note that the Visual Studio Codespaces extension requires the Visual Studio Code distribution of Code - OSS.
41+
2. After the codespace is up and running in your browser, press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> and select **View: Show Remote Explorer**.
4242

43-
2. Sign in by pressing <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> and selecting **Codespaces: Sign In**. You may also need to use the **Codespaces: Create Plan** if you do not have a plan. See the [Codespaces docs](https://aka.ms/vso-docs/vscode) for details.
43+
3. You should see port `6080` under **Forwarded Ports**. Select the line and click on the globe icon to open it in a browser tab.
4444

45-
3. Press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> and select **Codespaces: Create New Codespace**.
45+
> If you do not see port `6080`, press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>, select **Forward a Port** and enter port `6080`.
4646
47-
4. Use default settings (which should include **Standard** 4 core, 8 GB RAM Codespace), select a plan, and then enter the repository URL `https://github.com/microsoft/vscode` (or a branch or PR URL) in the input box when prompted.
47+
4. In the new tab, you should see noVNC. Click **Connect** and enter `vscode` as the password.
4848

49-
5. After the container is running, open a web browser and go to [http://localhost:6080](http://localhost:6080) or use a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) to connect to `localhost:5901` and enter `vscode` as the password.
49+
Anything you start in VS Code or the integrated terminal will appear here.
50+
51+
Next: **[Try it out!](#try-it)**
52+
53+
### Using VS Code with GitHub Codespaces
54+
55+
You will likely see better performance when accessing the codespace you created from VS Code since you can use a[VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/). Here's how to do it.
56+
57+
1. [Create a codespace](#quick-start---github-codespaces) if you have not already.
5058

51-
6. Anything you start in VS Code or the integrated terminal will appear here.
59+
2. Set up [VS Code for use with GitHub Codespaces](https://docs.github.com/github/developing-online-with-codespaces/using-codespaces-in-visual-studio-code)
60+
61+
3. After the VS Code is up and running, press <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>, choose **Codespaces: Connect to Codespace**, and select the codespace you created.
62+
63+
4. After you've connected to the codespace, use a [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) to connect to `localhost:5901` and enter `vscode` as the password.
64+
65+
5. Anything you start in VS Code or the integrated terminal will appear here.
66+
67+
Next: **[Try it out!](#try-it)**
5268

5369
## Try it!
5470

.devcontainer/bin/init-dev-container.sh

Lines changed: 0 additions & 91 deletions
This file was deleted.

.devcontainer/bin/set-resolution

Lines changed: 0 additions & 25 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,26 @@
11
{
22
"name": "Code - OSS",
3-
"build": {
4-
"dockerfile": "Dockerfile",
5-
"args": {
6-
"MAX_VNC_RESOLUTION": "1920x1080x16",
7-
"TARGET_VNC_RESOLUTION": "1280x768",
8-
"TARGET_VNC_PORT": "5901",
9-
"TARGET_NOVNC_PORT": "6080",
10-
"VNC_PASSWORD": "vscode",
11-
"INSTALL_FIREFOX": "true"
12-
}
13-
},
3+
4+
// Image contents: https://github.com/microsoft/vscode-dev-containers/blob/master/repository-containers/images/github.com/microsoft/vscode/.devcontainer/base.Dockerfile
5+
"image": "mcr.microsoft.com/vscode/devcontainers/repos/microsoft/vscode:dev",
6+
7+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/node/workspace/vscode,type=bind,consistency=cached",
8+
"workspaceFolder": "/home/node/workspace/vscode",
149
"overrideCommand": false,
15-
"runArgs": [
16-
"--init",
17-
// seccomp=unconfined is required for Chrome sandboxing
18-
"--security-opt", "seccomp=unconfined"
19-
],
10+
"runArgs": [ "--init", "--security-opt", "seccomp=unconfined"],
2011

2112
"settings": {
22-
// zsh is also available
2313
"terminal.integrated.shell.linux": "/bin/bash",
2414
"resmon.show.battery": false,
25-
"resmon.show.cpufreq": false,
26-
"remote.extensionKind": {
27-
"ms-vscode.js-debug-nightly": "workspace",
28-
"msjsdiag.debugger-for-chrome": "workspace"
29-
},
30-
"debug.chrome.useV3": true
15+
"resmon.show.cpufreq": false
3116
},
3217

33-
// noVNC, VNC ports
34-
"forwardPorts": [6080, 5901],
18+
// noVNC, VNC ports, debug
19+
"forwardPorts": [6080, 5901, 9222],
3520

3621
"extensions": [
3722
"dbaeumer.vscode-eslint",
3823
"EditorConfig.EditorConfig",
39-
"msjsdiag.debugger-for-chrome",
4024
"mutantdino.resourcemonitor",
4125
"GitHub.vscode-pull-request-github"
4226
],

.devcontainer/fluxbox/apps

Lines changed: 0 additions & 9 deletions
This file was deleted.

.devcontainer/fluxbox/init

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)