-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs VS Code remote containers (#541)
- Loading branch information
1 parent
f4e1427
commit c7aefdc
Showing
5 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# VS Code Remote Container | ||
|
||
> Git credentials need to be setup in order to commit changes inside the remote | ||
container using VS Code. | ||
|
||
VS Code Remote Containers is a quick way to get started with internal Mesop | ||
development if you have [VS Code](https://code.visualstudio.com/) and | ||
[Docker Desktop](https://www.docker.com/products/docker-desktop/) installed. | ||
|
||
This approach will create a fully configured workspace, saving you time from | ||
debugging installation issues and allowing you to start development right away. | ||
|
||
## Pre-requistes: Install VS Code and Docker | ||
|
||
In order to use VS Code remote containers, you will need VS Code installed. You will | ||
also need Docker Desktop (which will install Docker Engine and Docker Compose) to run | ||
the remote containers. | ||
|
||
- [VS Code](https://code.visualstudio.com/) | ||
- [Docker Desktop](https://www.docker.com/products/docker-desktop/) | ||
|
||
## Fork and Clone the Mesop repository | ||
|
||
> It is not recommended to develop locally and on remote containers using the same | ||
folder since this may cause unexpected conflicts. Instead you should clone the | ||
repository in a separate directory. | ||
|
||
You can follow the instructions here on [how to fork and clone a Github repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo). | ||
|
||
## Open folder in container | ||
|
||
> It is not recommended to develop locally and on remote containers using the same | ||
folder since this may cause conflicts with Bazel. Instead you should clone the | ||
repository in a separate directory. | ||
|
||
Open VS Code, press `Cmd/Ctrl + Shift + P`, and select the `Dev Containers: Open Folder in Container...` | ||
option. This will create a new workspace inside a remote container. | ||
|
||
![VS Code open folder in container](../assets/remote-container/open-folder-container.png) | ||
|
||
## Wait for postCreateCommand to run | ||
|
||
The workspace will not be usable until the `postCreateCommand` has completed. | ||
|
||
![Post Create Command](../assets/remote-container/post-create-command.png) | ||
|
||
## Run Mesop for development | ||
|
||
Once the `postCreateCommand` has finished, you can now start Mesop in the terminal. | ||
|
||
``` | ||
./scripts/cli.sh | ||
``` | ||
|
||
You will see some warning messages, but it is OK to ignore them. | ||
|
||
You should see this message once the Mesop server is ready. | ||
|
||
![Server started](../assets/remote-container/server-start.png) | ||
|
||
## View Mesop demos | ||
|
||
Once `./scripts/cli.sh` has started the Mesop dev server, you can view the demos at | ||
http://localhost:32123. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters