You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn-pr/azure/intro-to-containers/includes/3-exercise-deploy-docker-image-locally.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
A good starting point for building and running your own Docker images is to take an existing image from Docker Hub and run it locally on your computer.
2
2
3
-
As a proof of concept for the company's applications, you decide to try running a sample image from Docker Hub. The image you've selected implements a basic .NET Core ASP.NET web app. Once you've established a process for deploying a Docker image, you'll be able to run one of your company's own web apps using Docker.
3
+
As a proof of concept for the company's applications, you decide to try running a sample image from Docker Hub. The image you selected implements a basic .NET Core ASP.NET web app. Once you establish a process for deploying a Docker image, you're able to run one of your company's own web apps using Docker.
4
4
5
-
In this exercise, you'll pull an image from Docker Hub and run it. You'll examine the local state of Docker to help understand the elements that are deployed. Finally, you'll remove the container and image from your computer.
5
+
In this exercise, you pull an image from Docker Hub and run it. You examine the local state of Docker to help understand the elements that are deployed. Finally, you remove the container and image from your computer.
6
6
7
7
> [!IMPORTANT]
8
8
> This exercise takes place on your computer, not in Azure. You need a local installation of Docker to proceed with the exercise. Download: https://docs.docker.com/desktop/install/windows-install/
@@ -19,15 +19,15 @@ In this exercise, you'll pull an image from Docker Hub and run it. You'll examin
1. Enter the following code to verify that the image has been stored locally.
22
+
1. Enter the following code to verify that the image was stored locally.
23
23
24
24
```bash
25
25
docker image ls
26
26
```
27
27
28
28
You should see a repository named *mcr.microsoft.com/dotnet/samples* with a tag of *aspnetapp*.
29
29
30
-
1. Enter the following code to start the sample app. The *-d* flag is to run it as a background, non-interactive app. The *-p* flag is to map port 8080 in the container that's created to port 8080 locally. This setting is intended to avoid conflicts with any web apps already running on your computer. The command will respond with a lengthy hexadecimal identifier for the instance.
30
+
1. Enter the following code to start the sample app. The `-d` flag is to run it as a background, non-interactive app. The `p` flag is to map port 8080 in the container that's created to port 8080 locally. This setting is intended to avoid conflicts with any web apps already running on your computer. The command responds with a lengthy hexadecimal identifier for the instance.
31
31
32
32
```bash
33
33
docker run -d -p 8080:8080 mcr.microsoft.com/dotnet/samples:aspnetapp
@@ -45,14 +45,14 @@ In this exercise, you'll pull an image from Docker Hub and run it. You'll examin
45
45
docker ps
46
46
```
47
47
48
-
The output should look similar to the following:
48
+
The output should look similar to the following example:
49
49
50
50
```console
51
51
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
52
52
96c851831ade mcr.microsoft.com/dotnet/samples:aspnetapp "dotnet aspnetapp.dll" 22 minutes ago Up 22 minutes 0.0.0.0:8080->80/tcp eager_montalcini
53
53
```
54
54
55
-
The **COMMAND** field shows the container started by running the command *dotnet aspnetapp.dll*. This command invokes the .NET Core runtime to start the code in the aspnetapp.dll (the code for the sample web app). The *PORTS* field indicates that port 8080 in the image was mapped to port 8080 on your computer. The *STATUS* field shows the application is still running. Make a note of the container's *NAME*.
55
+
The **COMMAND** field shows the container started by running the command *dotnet aspnetapp.dll*. This command invokes the .NET Core runtime to start the code in the aspnetapp.dll (the code for the sample web app). The *PORTS* field indicates that port 8080 in the image was mapped to port 80 on your computer. The *STATUS* field shows the application is still running. Make a note of the container's *NAME*.
56
56
57
57
1. Run the following command to stop the Docker container, replacing the placeholder `<NAME>` with the output name from the previous command.
58
58
@@ -76,7 +76,7 @@ In this exercise, you'll pull an image from Docker Hub and run it. You'll examin
76
76
docker container rm <NAME>
77
77
```
78
78
79
-
1. Verify that the container has been removed by running the following command. The command should no longer list the container.
79
+
1. Verify that the container was removed by running the following command. The command should no longer list the container.
80
80
81
81
```bash
82
82
docker ps -a
@@ -94,7 +94,7 @@ In this exercise, you'll pull an image from Docker Hub and run it. You'll examin
1. The output should list numerous items that have been untagged and deleted. Run the following command to list the images again and verify that the image for the *microsoft/dotnet-samples* web app has disappeared.
97
+
1. The output should list numerous items that were untagged and deleted. Run the following command to list the images again and verify that the image for the *microsoft/dotnet-samples* web app has disappeared.
0 commit comments