Update readme
This commit is contained in:
		
							
								
								
									
										25
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								README.md
									
									
									
									
									
								
							@@ -1,20 +1,30 @@
 | 
				
			|||||||
# Try Out Development Containers: Java
 | 
					# Try Out Development Containers: Java
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This is a sample project that lets you try out the **[VS Code Remote - Containers](https://aka.ms/vscode-remote/containers)** extension in a few easy steps.
 | 
					A **development container** is a running [Docker](https://www.docker.com) container with a well-defined tool/runtime stack and its prerequisites. You can try out development containers with **[GitHub Codespaces](https://github.com/features/codespaces)** or **[Visual Studio Code Remote - Containers](https://aka.ms/vscode-remote/containers)**.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
> **Note:** If you're following the quick start, you can jump to the [Things to try](#things-to-try) section. 
 | 
					This is a sample project that lets you try out either option in a few easy steps. We have a variety of other [vscode-remote-try-*](https://github.com/search?q=org%3Amicrosoft+vscode-remote-try-&type=Repositories) sample projects, too.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					> **Note:** If you already have a Codespace or dev container, you can jump to the [Things to try](#things-to-try) section.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Setting up the development container
 | 
					## Setting up the development container
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Follow these steps to open this sample in a container:
 | 
					### GitHub Codespaces
 | 
				
			||||||
 | 
					Follow these steps to open this sample in a Codespace:
 | 
				
			||||||
 | 
					1. Click the Code drop-down menu and select the **Open with Codespaces** option.
 | 
				
			||||||
 | 
					1. Select **+ New codespace** at the bottom on the pane. If you don't own the repo, this will create a fork of this repository under your account.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started).
 | 
					For more info, check out the [GitHub documentation](https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace#creating-a-codespace).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### VS Code Remote - Containers
 | 
				
			||||||
 | 
					Follow these steps to open this sample in a container using the VS Code Remote - Containers extension:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1. If this is your first time using a development container, please ensure your system meets the pre-reqs (i.e. have Docker installed) in the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2. To use this repository, you can either open the repository in an isolated Docker volume:
 | 
					2. To use this repository, you can either open the repository in an isolated Docker volume:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - Press <kbd>F1</kbd> and select the **Remote-Containers: Try a Sample...** command.
 | 
					    - Press <kbd>F1</kbd> and select the **Remote-Containers: Try a Sample...** command.
 | 
				
			||||||
    - Choose the "Java" sample, wait for the container to start and try things out!
 | 
					    - Choose the "Java" sample, wait for the container to start, and try things out!
 | 
				
			||||||
        > **Note:** Under the hood, this will use **Remote-Containers: Open Repository in Container...** command to clone the source code in a Docker volume instead of the local filesystem.
 | 
					        > **Note:** Under the hood, this will use the **Remote-Containers: Clone Repository in Container Volume...** command to clone the source code in a Docker volume instead of the local filesystem. [Volumes](https://docs.docker.com/storage/volumes/) are the preferred mechanism for persisting container data.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   Or open a locally cloned copy of the code:
 | 
					   Or open a locally cloned copy of the code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -24,7 +34,7 @@ Follow these steps to open this sample in a container:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
## Things to try
 | 
					## Things to try
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Once you have this sample opened in a container, you'll be able to work with it like you would locally.
 | 
					Once you have this sample opened, you'll be able to work with it like you would locally.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
> **Note:** This container runs as a non-root user with sudo access by default. Comment out `"remoteUser": "vscode"` in `.devcontainer/devcontainer.json` if you'd prefer to run as root.
 | 
					> **Note:** This container runs as a non-root user with sudo access by default. Comment out `"remoteUser": "vscode"` in `.devcontainer/devcontainer.json` if you'd prefer to run as root.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -33,6 +43,7 @@ Some things to try:
 | 
				
			|||||||
1. **Edit:**
 | 
					1. **Edit:**
 | 
				
			||||||
   - Open `src/main/java/com/mycompany/app/App.java`.
 | 
					   - Open `src/main/java/com/mycompany/app/App.java`.
 | 
				
			||||||
   - Try adding some code and check out the language features.
 | 
					   - Try adding some code and check out the language features.
 | 
				
			||||||
 | 
					   - Notice that the Java extension pack is already installed in the container since the `.devcontainer/devcontainer.json` lists `"vscjava.vscode-java-pack"` as an extension to install automatically when the container is created.
 | 
				
			||||||
2. **Terminal:** Press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>\`</kbd> and type `uname` and other Linux commands from the terminal window.
 | 
					2. **Terminal:** Press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>\`</kbd> and type `uname` and other Linux commands from the terminal window.
 | 
				
			||||||
3. **Build, Run, and Debug:**
 | 
					3. **Build, Run, and Debug:**
 | 
				
			||||||
   - Open `src/main/java/com/mycompany/app/App.java`.
 | 
					   - Open `src/main/java/com/mycompany/app/App.java`.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user