Skip to content

Commit ac08a49

Browse files
gkalpakkara
authored andcommitted
docs: add info on setting up VSCode remote development using docker containers (#33790)
In f78bda9, recommended configuration files were added to be used as basis for setting up [Remote Development using docker containers][1] in VSCode. Apparently, I had forgotten to commit the corresponding `README.md` file. This commit adds `.devcontainer/README.md` with more info on Remote Development in VSCode. [1]: https://code.visualstudio.com/docs/remote/containers PR Close #33790
1 parent 7df7e34 commit ac08a49

3 files changed

Lines changed: 34 additions & 2 deletions

File tree

.devcontainer/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# VSCode Remote Development - Developing inside a Containers
2+
3+
This folder contains configuration files that can be used to opt into working on this repository in a [Docker container](https://www.docker.com/resources/what-container) via [VSCode](https://code.visualstudio.com/)'s Remote Development feature (see below).
4+
5+
Info on remote development and developing inside a container with VSCode:
6+
- [VSCode: Remote Development](https://code.visualstudio.com/docs/remote/remote-overview)
7+
- [VSCode: Developing inside a Container](https://code.visualstudio.com/docs/remote/containers)
8+
- [VSCode: Remote Development FAQ](https://code.visualstudio.com/docs/remote/faq)
9+
10+
11+
## Usage
12+
13+
_Prerequisite: [Install Docker](https://docs.docker.com/install) on your local environment._
14+
15+
To get started, read and follow the instuctions in [Developing inside a Container](https://code.visualstudio.com/docs/remote/containers). The [.devcontainer/](.) directory contains pre-configured `devcontainer.json` and `Dockerfile` files, which you can use to set up remote development with a docker container.
16+
17+
In a nutshell, you need to:
18+
- Install the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension.
19+
- Copy [recommended-Dockerfile](./recommended-Dockerfile) to `Dockerfile` (and optionally tweak to suit your needs).
20+
- Copy [recommended-devcontainer.json](./recommended-devcontainer.json) to `devcontainer.json` (and optionally tweak to suit your needs).
21+
- Open VSCode and bring up the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette).
22+
- Type `Remote-Containers: Open Folder in Container` and choose your local clone of [angular/angular](https://github.com/angular/angular).
23+
24+
The `.devcontainer/devcontainer.json` and `.devcontainer/Dockerfile` files are ignored by git, so you can have your own local versions. We may occasionally update the template files ([recommended-devcontainer.json](./recommended-devcontainer.json), [recommended-Dockerfile](./recommended-Dockerfile)), in which case you will need to manually update your local copies (if desired).
25+
26+
27+
## Updating `recommended-devcontainer.json` and `recommended-Dockerfile`
28+
29+
You can update and commit the recommended config files (which people use as basis for their local configs), if you find that something is broken, out-of-date or can be improved.
30+
31+
Please, keep in mind that any changes you make will potentially be used by many people on different environments. Try to keep these config files cross-platform compatible and free of personal preferences.

.devcontainer/recommended-Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Image metadata and config.
2-
FROM circleci/node:10-browsers
2+
FROM circleci/node:10-browsers # This needs to be in sync with what we use on CI.
33

44
LABEL name="Angular dev environment" \
55
description="This image can be used to create a dev environment for building Angular." \
@@ -15,7 +15,7 @@ USER root
1515

1616
# Configure `Node.js`/`npm` and install utilities.
1717
RUN npm config --global set user root
18-
RUN npm install --global yarn@1.13.0 # This needs to be in sync with what we use on CI.
18+
RUN npm install --global yarn@1.19.1 # This needs to be in sync with what we use on CI.
1919

2020

2121
# Go! (And keep going.)

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ pubspec.lock
1313
.c9
1414
.idea/
1515
.devcontainer/*
16+
!.devcontainer/README.md
1617
!.devcontainer/recommended-devcontainer.json
1718
!.devcontainer/recommended-Dockerfile
1819
.settings/

0 commit comments

Comments
 (0)