Update README.md
This commit is contained in:
		
				
					committed by
					
						
						Christof Marti
					
				
			
			
				
	
			
			
			
						parent
						
							48b2be7050
						
					
				
				
					commit
					a0f42c63fb
				
			
							
								
								
									
										20
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								README.md
									
									
									
									
									
								
							@@ -1,8 +1,8 @@
 | 
			
		||||
# Try Out Development Containers: Go
 | 
			
		||||
 | 
			
		||||
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode-remote-try-go)
 | 
			
		||||
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode-remote-try-go)
 | 
			
		||||
 | 
			
		||||
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)**.
 | 
			
		||||
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 Dev Containers](https://aka.ms/vscode-remote/containers)**.
 | 
			
		||||
 | 
			
		||||
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.
 | 
			
		||||
 | 
			
		||||
@@ -17,24 +17,24 @@ Follow these steps to open this sample in a Codespace:
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
### VS Code Dev Containers
 | 
			
		||||
 | 
			
		||||
If you already have VS Code and Docker installed, you can click the badge above or [here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode-remote-try-go) to get started. Clicking these links will cause VS Code to automatically install the Remote - Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use.
 | 
			
		||||
If you already have VS Code and Docker installed, you can click the badge above or [here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode-remote-try-go) to get started. Clicking these links will cause VS Code to automatically install the Dev Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use.
 | 
			
		||||
 | 
			
		||||
Follow these steps to open this sample in a container using the VS Code Remote - Containers extension:
 | 
			
		||||
Follow these steps to open this sample in a container using the VS Code Dev 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:
 | 
			
		||||
 | 
			
		||||
    - Press <kbd>F1</kbd> and select the **Remote-Containers: Try a Sample...** command.
 | 
			
		||||
    - Press <kbd>F1</kbd> and select the **Dev Containers: Try a Sample...** command.
 | 
			
		||||
    - Choose the "Go" sample, wait for the container to start, and try things out!
 | 
			
		||||
        > **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.
 | 
			
		||||
        > **Note:** Under the hood, this will use the **Dev 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:
 | 
			
		||||
 | 
			
		||||
   - Clone this repository to your local filesystem.
 | 
			
		||||
   - Press <kbd>F1</kbd> and select the **Remote-Containers: Open Folder in Container...** command.
 | 
			
		||||
   - Press <kbd>F1</kbd> and select the **Dev Containers: Open Folder in Container...** command.
 | 
			
		||||
   - Select the cloned copy of this folder, wait for the container to start, and try things out!
 | 
			
		||||
   
 | 
			
		||||
## Things to try
 | 
			
		||||
@@ -60,7 +60,7 @@ Some things to try:
 | 
			
		||||
        - Clicking the globe icon in the 'Ports' view. The 'Ports' view gives you an organized table of your forwarded ports, and you can get there by clicking on the "1" in the status bar, which means your app has 1 forwarded port.
 | 
			
		||||
   - Notice port 9000 in the 'Ports' view is labeled "Hello Remote World." In `devcontainer.json`, you can set `"portsAttributes"`, such as a label for your forwarded ports and the action to be taken when the port is autoforwarded.
 | 
			
		||||
 | 
			
		||||
   > **Note:** In Remote - Containers, you can access your app at `http://localhost:9000` in a local browser. But in a browser-based Codespace, you must click the link from the notification or the `Ports` view so that the service handles port forwarding in the browser and generates the correct URL.
 | 
			
		||||
   > **Note:** In Dev Containers, you can access your app at `http://localhost:9000` in a local browser. But in a browser-based Codespace, you must click the link from the notification or the `Ports` view so that the service handles port forwarding in the browser and generates the correct URL.
 | 
			
		||||
   
 | 
			
		||||
4. **Rebuild or update your container:** 
 | 
			
		||||
 | 
			
		||||
@@ -70,7 +70,7 @@ Some things to try:
 | 
			
		||||
   
 | 
			
		||||
   - Open the `.devcontainer/devcontainer.json` file.
 | 
			
		||||
   - Modify the `"onAutoForward"` attribute in your `portsAttributes` from `"notify"` to `"openBrowser"`.
 | 
			
		||||
   - Press <kbd>F1</kbd> and select the **Remote-Containers: Rebuild Container** or **Codespaces: Rebuild Container** command so the modifications are picked up.
 | 
			
		||||
   - Press <kbd>F1</kbd> and select the **Dev Containers: Rebuild Container** or **Codespaces: Rebuild Container** command so the modifications are picked up.
 | 
			
		||||
5. **Refactoring - rename:**
 | 
			
		||||
    - Open `hello.go`, select method name `Hello` press <kbd>F1</kbd> and run the **Rename Symbol** command.
 | 
			
		||||
6. **Refactoring - extract:**
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user