Skip to content

Commit 7b7af31

Browse files
authored
Merge pull request docker#10310 from usha-mandya/get-started-patch
Get started updates: fix hyperlinks and review comments
2 parents b1900aa + 942fcb1 commit 7b7af31

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

get-started/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ At this point, you've installed Docker Desktop on your development machine, and
160160
161161
## CLI references
162162
163-
Further documentation for all CLI commands used in this article is available here:
163+
Refer to the following topics for further documentation on all CLI commands used in this article:
164164
165-
- [`docker version`](https://docs.docker.com/engine/reference/commandline/version/)
166-
- [`docker run`](https://docs.docker.com/engine/reference/commandline/run/)
167-
- [`docker image`](https://docs.docker.com/engine/reference/commandline/image/)
168-
- [`docker container`](https://docs.docker.com/engine/reference/commandline/container/)
165+
- [docker version](https://docs.docker.com/engine/reference/commandline/version/)
166+
- [docker run](https://docs.docker.com/engine/reference/commandline/run/)
167+
- [docker image](https://docs.docker.com/engine/reference/commandline/image/)
168+
- [docker container](https://docs.docker.com/engine/reference/commandline/container/)

get-started/part2.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ Work through the orientation and setup in [Part 1](index.md).
1212

1313
## Introduction
1414

15-
Now that we've set up our development environment, thanks to Docker Desktop,
16-
we can begin to develop containerized applications. In general, the development workflow looks like this:
15+
Now that you've set up your development environment, thanks to Docker Desktop,
16+
you can begin to develop containerized applications. In general, the development workflow looks like this:
1717

1818
1. Create and test individual containers for each component of your application by first creating Docker images.
1919
2. Assemble your containers and supporting infrastructure into a complete application.
2020
3. Test, share, and deploy your complete containerized application.
2121

22-
In this stage of the tutorial, let's focus on step 1 of this workflow: creating the images that our containers will be based on. Remember, a Docker image captures the private filesystem that our containerized processes will run in; we need to create an image that contains just what our application needs to run.
22+
In this stage of the tutorial, let's focus on step 1 of this workflow: creating the images that your containers will be based on. Remember, a Docker image captures the private filesystem that your containerized processes will run in; you need to create an image that contains just what your application needs to run.
2323

2424
> **Containerized development environments** are easier to set up than traditional development environments, once you learn how to build images as we'll discuss below. This is because a containerized development environment will isolate all the dependencies your app needs inside your Docker image; there's no need to install anything other than Docker on your development machine. In this way, you can easily develop applications for different stacks without changing anything on your development machine.
2525
@@ -114,27 +114,27 @@ CMD [ "npm", "start" ]
114114
COPY . .
115115
```
116116

117-
Writing a Dockerfile is the first step to containerizing an application. You can think of these Dockerfile commands as a step-by-step recipe on how to build up our image. This one takes the following steps:
117+
Writing a Dockerfile is the first step to containerizing an application. You can think of these Dockerfile commands as a step-by-step recipe on how to build up your image. This one takes the following steps:
118118

119119
- Start `FROM` the pre-existing `node:current-slim` image. This is an *official image*, built by the node.js vendors and validated by Docker to be a high-quality image containing the Node.js Long Term Support (LTS) interpreter and basic dependencies.
120120
- Use `WORKDIR` to specify that all subsequent actions should be taken from the directory `/usr/src/app` *in your image filesystem* (never the host's filesystem).
121121
- `COPY` the file `package.json` from your host to the present location (`.`) in your image (so in this case, to `/usr/src/app/package.json`)
122122
- `RUN` the command `npm install` inside your image filesystem (which will read `package.json` to determine your app's node dependencies, and install them)
123123
- `COPY` in the rest of your app's source code from your host to your image filesystem.
124124

125-
You can see that these are much the same steps you might have taken to set up and install your app on your host. However, capturing these as a Dockerfile allows us to do the same thing inside a portable, isolated Docker image.
125+
You can see that these are much the same steps you might have taken to set up and install your app on your host. However, capturing these as a Dockerfile allows you to do the same thing inside a portable, isolated Docker image.
126126

127-
The steps above built up the filesystem of our image, but there are other lines in our Dockerfile.
127+
The steps above built up the filesystem of our image, but there are other lines in your Dockerfile.
128128

129-
The `CMD` directive is our first example of specifying some metadata in our image that describes how to run a container based on this image. In this case, it's saying that the containerized process that this image is meant to support is `npm start`.
129+
The `CMD` directive is the first example of specifying some metadata in your image that describes how to run a container based on this image. In this case, it's saying that the containerized process that this image is meant to support is `npm start`.
130130

131131
The `EXPOSE 8080` informs Docker that the container is listening on port 8080 at runtime.
132132

133-
What you see above is a good way to organize a simple Dockerfile; always start with a `FROM` command, follow it with the steps to build up your private filesystem, and conclude with any metadata specifications. There are many more Dockerfile directives than just the few we see above; for a complete list, see the [Dockerfile reference](https://docs.docker.com/engine/reference/builder/).
133+
What you see above is a good way to organize a simple Dockerfile; always start with a `FROM` command, follow it with the steps to build up your private filesystem, and conclude with any metadata specifications. There are many more Dockerfile directives than just the few you see above. For a complete list, see the [Dockerfile reference](https://docs.docker.com/engine/reference/builder/).
134134

135135
## Build and test your image
136136

137-
Now that we have some source code and a Dockerfile, it's time to build our first image, and make sure the containers launched from it work as expected.
137+
Now that you have some source code and a Dockerfile, it's time to build your first image, and make sure the containers launched from it work as expected.
138138

139139
> **Windows users**: this example uses Linux containers. Make sure your environment is running Linux containers by right-clicking on the Docker logo in your system tray, and clicking **Switch to Linux containers** if the option appears. Don't worry - all the commands in this tutorial work the exact same way for Windows containers.
140140
@@ -156,15 +156,15 @@ You'll see Docker step through each instruction in your Dockerfile, building up
156156
docker container run --publish 8000:8080 --detach --name bb bulletinboard:1.0
157157
```
158158
159-
We used a couple of common flags here:
159+
There are a couple of common flags here:
160160
161-
- `--publish` asks Docker to forward traffic incoming on the host's port 8000, to the container's port 8080 (containers have their own private set of ports, so if we want to reach one from the network, we have to forward traffic to it in this way; otherwise, firewall rules will prevent all network traffic from reaching your container, as a default security posture).
161+
- `--publish` asks Docker to forward traffic incoming on the host's port 8000, to the container's port 8080. Containers have their own private set of ports, so if you want to reach one from the network, you have to forward traffic to it in this way. Otherwise, firewall rules will prevent all network traffic from reaching your container, as a default security posture.
162162
- `--detach` asks Docker to run this container in the background.
163-
- `--name` lets us specify a name with which we can refer to our container in subsequent commands, in this case `bb`.
163+
- `--name` specifies a name with which you can refer to your container in subsequent commands, in this case `bb`.
164164
165-
Also notice, we didn't specify what process we wanted our container to run. We didn't have to, since we used the `CMD` directive when building our Dockerfile; thanks to this, Docker knows to automatically run the process `npm start` inside our container when it starts up.
165+
Also notice, you didn't specify what process you wanted your container to run. You didn't have to, as you've used the `CMD` directive when building your Dockerfile; thanks to this, Docker knows to automatically run the process `npm start` inside the container when it starts up.
166166
167-
2. Visit your application in a browser at `localhost:8000`. You should see your bulletin board application up and running. At this step, we would normally do everything we could to ensure our container works the way we expected; now would be the time to run unit tests, for example.
167+
2. Visit your application in a browser at `localhost:8000`. You should see your bulletin board application up and running. At this step, you would normally do everything you could to ensure your container works the way you expected; now would be the time to run unit tests, for example.
168168
169169
3. Once you're satisfied that your bulletin board container works correctly, you can delete it:
170170
@@ -176,7 +176,7 @@ You'll see Docker step through each instruction in your Dockerfile, building up
176176
177177
## Conclusion
178178
179-
At this point, we've successfully built an image, performed a simple containerization of an application, and confirmed that our app runs successfully in its container. The next step will be to share your images on [Docker Hub](https://hub.docker.com/), so they can be easily downloaded and run on any destination machine.
179+
At this point, you've successfully built an image, performed a simple containerization of an application, and confirmed that your app runs successfully in its container. The next step will be to share your images on [Docker Hub](https://hub.docker.com/), so they can be easily downloaded and run on any destination machine.
180180
181181
[On to Part 3 >>](part3.md){: class="button outline-btn" style="margin-bottom: 30px; margin-right: 100%"}
182182

get-started/part3.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ At this point, you've set up your Docker Hub account and have connected it to yo
4242

4343
![make a repo](images/newrepo.png){:width="100%"}
4444

45-
3. Now we're ready to share our image on Docker Hub, but there's one thing we must do first: images must be *namespaced correctly* to share on Docker Hub. Specifically, images must be named like `<Docker ID>/<Repository Name>:<tag>`. We can relabel our `bulletinboard:1.0` image like this (of course, please replace `gordon` with your Docker ID):
45+
3. Now you are ready to share your image on Docker Hub, but there's one thing you must do first: images must be *namespaced correctly* to share on Docker Hub. Specifically, you must name images like `<Docker ID>/<Repository Name>:<tag>`. You can relabel your `bulletinboard:1.0` image like this (of course, please replace `gordon` with your Docker ID):
4646

4747
```shell
4848
docker image tag bulletinboard:1.0 gordon/bulletinboard:1.0
@@ -60,9 +60,9 @@ At this point, you've set up your Docker Hub account and have connected it to yo
6060

6161
## Conclusion
6262

63-
Now that your image is available on Docker Hub, you'll be able to run it anywhere. If you try to use it on a new machine that doesn't have it yet, Docker will automatically try and download it from Docker Hub. By moving images around in this way, you no longer need to install any dependencies except Docker on the machines you want to run our software on. The dependencies of containerized applications are completely encapsulated and isolated within your images, which we can share using Docker Hub as described above.
63+
Now that your image is available on Docker Hub, you'll be able to run it anywhere. If you try to use it on a new machine that doesn't have it yet, Docker will automatically try and download it from Docker Hub. By moving images around in this way, you no longer need to install any dependencies except Docker on the machines you want to run your software on. The dependencies of containerized applications are completely encapsulated and isolated within your images, which you can share using Docker Hub as described above.
6464

65-
Another thing to keep in mind: at the moment, we've only pushed your image to Docker Hub; what about your Dockerfile? A crucial best practice is to keep these in version control, perhaps alongside your source code for your application. You can add a link or note in your Docker Hub repository description indicating where these files can be found, preserving the record not only of how your image was built, but how it's meant to be run as a full application.
65+
Another thing to keep in mind: at the moment, you've only pushed your image to Docker Hub; what about your Dockerfile? A crucial best practice is to keep these in version control, perhaps alongside your source code for your application. You can add a link or note in your Docker Hub repository description indicating where these files can be found, preserving the record not only of how your image was built, but how it's meant to be run as a full application.
6666

6767
## Where to go next
6868

0 commit comments

Comments
 (0)