Skip to content

Commit f5311f7

Browse files
authored
Merge pull request #4 from MicrosoftDocs/master
Updating to master
2 parents e5ec661 + 59f9d68 commit f5311f7

File tree

10,357 files changed

+66791
-474076
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

10,357 files changed

+66791
-474076
lines changed

.openpublishing.redirection.json

Lines changed: 49835 additions & 6751 deletions
Large diffs are not rendered by default.

.whatsnew.json

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
{
2+
"$schema": "https://whatsnewapi.azurewebsites.net/schema",
3+
"docSetProductName": "Visual Studio",
4+
"rootDirectory": "docs/",
5+
"docLinkSettings": {
6+
"linkFormat": "relative",
7+
"relativeLinkPrefix": "../"
8+
},
9+
"inclusionCriteria": {
10+
"additionalMicrosoftOrgs": [
11+
"ASP.NET"
12+
],
13+
"labels": [
14+
"-label:CLA"
15+
],
16+
"minAdditionsToFile": 10
17+
},
18+
"areas": [
19+
{
20+
"name": "ai",
21+
"heading": "AI"
22+
},
23+
{
24+
"name": "azure",
25+
"heading": "Azure"
26+
},
27+
{
28+
"name": "code-quality",
29+
"heading": "Code quality"
30+
},
31+
{
32+
"name": "containers",
33+
"heading": "Containers"
34+
},
35+
{
36+
"name": "cross-platform",
37+
"heading": "Cross platform"
38+
},
39+
{
40+
"name": "data-tools",
41+
"heading": "Data tools"
42+
},
43+
{
44+
"name": "debugger",
45+
"heading": "Debugger"
46+
},
47+
{
48+
"name": "deployment",
49+
"heading": "Deployment"
50+
},
51+
{
52+
"name": "designers",
53+
"heading": "Designers"
54+
},
55+
{
56+
"name": "extensibility",
57+
"heading": "Extensibility"
58+
},
59+
{
60+
"name": "get-started",
61+
"heading": "Get started"
62+
},
63+
{
64+
"name": "help-viewer",
65+
"heading": "Help viewer"
66+
},
67+
{
68+
"name": "ide",
69+
"heading": "IDE"
70+
},
71+
{
72+
"name": "install",
73+
"heading": "Install"
74+
},
75+
{
76+
"name": "javascript",
77+
"heading": "JavaScript"
78+
},
79+
{
80+
"name": "media",
81+
"heading": "Media"
82+
},
83+
{
84+
"name": "misc",
85+
"heading": "Misc"
86+
},
87+
{
88+
"name": "modeling",
89+
"heading": "Modeling"
90+
},
91+
{
92+
"name": "msbuild",
93+
"heading": "MSBuild"
94+
},
95+
{
96+
"name": "porting",
97+
"heading": "Porting"
98+
},
99+
{
100+
"name": "profiling",
101+
"heading": "Profiling"
102+
},
103+
{
104+
"name": "python",
105+
"heading": "Python"
106+
},
107+
{
108+
"name": "rtvs",
109+
"heading": "RTVS"
110+
},
111+
{
112+
"name": "sharepoint",
113+
"heading": "SharePoint"
114+
},
115+
{
116+
"name": "test",
117+
"heading": "Test"
118+
},
119+
{
120+
"name": "vs-2015",
121+
"heading": "VS 2015"
122+
},
123+
{
124+
"name": "vsto",
125+
"heading": "Vsto"
126+
},
127+
{
128+
"name": "windows",
129+
"heading": "Windows"
130+
},
131+
{
132+
"name": "workflow-designer",
133+
"heading": "Workflow designer"
134+
},
135+
{
136+
"name": "xaml-tools",
137+
"heading": "XAML tools"
138+
},
139+
{
140+
"name": "xml-tools",
141+
"heading": "XML tools"
142+
}
143+
]
144+
}

docker/TOC.yml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,35 @@
1-
- name: Index
2-
href: index.md
1+
- name: Docker
2+
expanded: true
3+
items:
4+
- name: Introduction to Docker for VS Code users
5+
expanded: true
6+
items:
7+
- name: "Getting started"
8+
href: tutorials/docker-tutorial.md
9+
- name: "Part 1: The application"
10+
href: tutorials/your-application.md
11+
- name: "Part 2: Update your app"
12+
href: tutorials/update-your-app.md
13+
- name: "Part 3: Share your app"
14+
href: tutorials/share-your-app.md
15+
- name: "Part 4: Persist your database"
16+
href: tutorials/persist-your-data.md
17+
- name: "Part 5: Use bind mounts"
18+
href: tutorials/use-bind-mounts.md
19+
- name: "Part 6: Multi-container apps"
20+
href: tutorials/multi-container-apps.md
21+
- name: "Part 7: Use Docker Compose"
22+
href: tutorials/use-docker-compose.md
23+
- name: "Part 8: Image-building best practices"
24+
href: tutorials/image-building-best-practices.md
25+
- name: "Part 9: Deploy to the cloud"
26+
href: tutorials/deploy-to-cloud.md
27+
- name: "What's next?"
28+
href: tutorials/whats-next.md
29+
30+
- name: Sources
31+
items:
32+
- name: Examples
33+
href: https://github.com/docker/awesome-compose
34+
- name: Docker ACI integration
35+
href: https://github.com/docker/aci-integration-beta/

docker/docfx.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,16 @@
3939
"overwrite": [],
4040
"externalReference": [],
4141
"globalMetadata": {
42+
"feedback_system": "GitHub",
43+
"feedback_github_repo": "MicrosoftDocs/visualstudio-docs",
4244
"breadcrumb_path": "/visualstudio/docker/breadcrumb/toc.json",
4345
"extendBreadcrumb": true,
44-
"feedback_system": "None"
46+
"ms.prod": "visual-studio-windows",
47+
"manager": "jillfra",
48+
"author": "jillre",
49+
"ms.author": "jillfra",
50+
"ms.topic": "conceptual",
51+
"audience": "developer"
4552
},
4653
"fileMetadata": {},
4754
"template": [],

docker/index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docker/tutorials/deploy-to-cloud.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: "Docker tutorial - Part 9: Deploy to the cloud"
3+
description: Deploy a docker app to a cloud service for hosting.
4+
ms.date: "08/04/2020"
5+
author: nebuk89
6+
ms.author: ghogen
7+
manager: jillfra
8+
ms.technology: vs-azure
9+
ms.topic: conceptual
10+
ms.workload:
11+
- "azure"
12+
---
13+
# Deploy to the cloud
14+
15+
Now that you have run your app locally, you can start to think about running it in the cloud so other people can access it and make use of it. To do this, you'll use Docker contexts. A context is the place where you're currently working with containers. Right now, you only have your "default" context, so you'll need to add a cloud one and deploy your app to it.
16+
17+
## Create your cloud context
18+
19+
1. To start, you can see what contexts you have by looking at the contexts section of the Docker panel:
20+
21+
![Shows only default context](media/defaultcontext.png)
22+
23+
You should only see your default context for local work.
24+
25+
1. To deploy to the cloud, you need to create a new ACI context, but to do this, you first need the Azure account extension to authenticate with Azure.
26+
27+
![Adding Azure extension](media/addazureextension.png)
28+
29+
You'll need to set up an Azure account if you don’t already have one.
30+
31+
1. Now you can create your new ACI context. You can do this by clicking the plus button on the **Contexts** section of the Docker view.
32+
33+
![Creating your ACI context](media/createnewcontext.png)
34+
35+
This will ask you what resource group you want to run these containers under. Either select an existing group using the arrow keys, or use the default option to use the new group.
36+
37+
![Selecting your resource group](media/selectresourcegroup.png)
38+
39+
You can now see your ACI context listed and can right-click it to make it your current focus/in use context:
40+
41+
![New ACI context can be selected](media/listofcontexts.png)
42+
43+
## Run containers in the cloud
44+
45+
1. Now, use your ACI context and run the container.
46+
47+
```bash
48+
docker context use myacicontext
49+
docker run -dp 3000:3000 <username>/getting-started
50+
```
51+
52+
1. Having run this, now look at the container in your context.
53+
54+
![Container running in your ACI context](media/contextcontainer.png)
55+
56+
1. To check this is all working properly, you can right-click on the running container and choose **View in browser**.
57+
58+
![Container in ACI with public IP](media/containerinaci.png)
59+
60+
And, you can see that the container is running in a public IP and working correctly!
61+
62+
1. Now, you can have a look at our running container to see how it is working. You can start by having a look at the container logs:
63+
64+
```bash
65+
docker logs distracted-jackson
66+
```
67+
68+
1. You can also exec into your container as you would with a local container.
69+
70+
```bash
71+
docker exec -it distracted-jackson sh
72+
```
73+
74+
1. Lastly to clean up your working space and to make sure you're not being charged for continuing to run the test container, you can simply right-click on the running container and choose **Remove**.
75+
76+
## Recap
77+
78+
Fantastic, you've now taken your workload and deployed it to the cloud successfully for the first time. You can do all of this from the command line as well from within your ACI context using `docker run` and also using `docker compose up` to run your multi-container applications. To find out more about running your containers in the cloud, read through the extended [documentation on using ACI](https://docs.docker.com/engine/context/aci-integration/).
79+
80+
## Next steps
81+
82+
Continue with the tutorial!
83+
84+
> [!div class="nextstepaction"]
85+
> [What's next](whats-next.md)

docker/tutorials/docker-tutorial.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: "Docker tutorial - Get started with Docker"
3+
description: A multi-step tutorial that covers the basics of working with Docker with Visual Studio Code.
4+
ms.date: "08/04/2020"
5+
author: nebuk89
6+
ms.author: ghogen
7+
manager: jillfra
8+
ms.technology: vs-azure
9+
ms.topic: conceptual
10+
ms.workload:
11+
- "azure"
12+
next_page: app.md
13+
---
14+
15+
# Tutorial: Get started with Docker
16+
17+
In this tutorial, you'll learn about creating and deploying Docker apps, including using multiple containers with a database, and using Docker Compose. You'll also deploy your containerized app to Azure.
18+
19+
## Start the tutorial
20+
21+
If you've already run the command to get started with the tutorial, congratulations! If not, open a command prompt or bash window, and run the command:
22+
23+
```cli
24+
docker run -d -p 80:80 docker/getting-started
25+
```
26+
27+
You'll notice a few flags being used. Here's some more info on them:
28+
29+
- `-d` - run the container in detached mode (in the background)
30+
- `-p 80:80` - map port 80 of the host to port 80 in the container
31+
- `docker/getting-started` - the image to use
32+
33+
> [!TIP]
34+
> You can combine single character flags to shorten the full command.
35+
> As an example, the command above could be written as:
36+
>
37+
> ```cli
38+
> docker run -dp 80:80 docker/getting-started
39+
> ```
40+
41+
## The VS Code Extension
42+
43+
Before going too far, we want to highlight the Docker VS Code Extension, which gives you a quick view of the containers running on your machine. It gives you quick
44+
access to container logs, lets you get a shell inside the container, and lets you easily manage container lifecycle (stop, remove, and so on).
45+
46+
To access the extension, follow the instructions [here](https://code.visualstudio.com/docs/containers/overview). Use the Docker icon on the left to open the Docker view. If you open the extension now, you will see this tutorial running! The container name (`angry_taussig` below) is a randomly created name. So, you'll most likely have a different name.
47+
48+
![Tutorial container running in Docker Extension](media/vs-tutorial-in-extension.png)
49+
50+
## What is a container
51+
52+
Now that you've run a container, what *is* a container? Simply put, a container is simply another process on your machine that has been isolated from all other processes on the host machine. That isolation leverages [kernel namespaces and cgroups](https://medium.com/@saschagrunert/demystifying-containers-part-i-kernel-space-2c53d6979504), features that have been in Linux for a long time. Docker has worked to make these capabilities approachable and easy to use.
53+
54+
> [!NOTE]
55+
> **Creating Containers from Scratch**
56+
> If you'd like to see how containers are built from scratch, Liz Rice from Aqua Security has a video in which she creates a container from scratch in Go:
57+
>
58+
> [!VIDEO https://www.youtube-nocookie.com/embed/8fi7uSYlOdc]
59+
60+
## What is a container image
61+
62+
When running a container, it uses an isolated filesystem. This custom filesystem is provided by a **container image**. Since the image contains the container's filesystem, it must contain everything needed to run an application - all dependencies, configuration, scripts, binaries, and so on. The image also contains other configuration for the container, such as environment variables, a default command to run, and other metadata.
63+
64+
We'll dive deeper into images later on, covering topics such as layering, best practices, and more.
65+
66+
> [!NOTE]
67+
> If you're familiar with `chroot`, think of a container as an extended version of `chroot`. The filesystem is simply coming from the image. But, a container adds additional isolation not available when simply using chroot.
68+
69+
## Next steps
70+
71+
Continue with the tutorial!
72+
73+
> [!div class="nextstepaction"]
74+
> [The application](your-application.md)

0 commit comments

Comments
 (0)