Skip to content

Commit 2c3592b

Browse files
author
Mano Marks
authored
cleaning up files to emphasize using Docker for Mac or Docker for Windows instead of Docker Machine (docker#45)
1 parent c984dad commit 2c3592b

File tree

3 files changed

+17
-25
lines changed

3 files changed

+17
-25
lines changed

beginner/chapters/setup.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
There are no specific skills needed for this tutorial beyond a basic comfort with the command line and using a text editor. Prior experience in developing web applications will be helpful but is not required. As you proceed further along the tutorial, we'll make use of [Docker Hub](https://hub.docker.com/).
55

66
### Setting up your computer
7-
Getting all the tooling setup on your computer can be a daunting task, but thankfully getting Docker up and running on your favorite OS has become very easy.
7+
Getting all the tooling setup on your computer can be a daunting task, but getting Docker up and running on your favorite OS has become very easy.
88

9-
The *getting started* guide on Docker has detailed instructions for setting up Docker on [Mac](https://docs.docker.com/v1.11/engine/installation/mac/), [Linux](https://docs.docker.com/v1.11/engine/installation/linux/) and [Windows](https://docs.docker.com/v1.11/engine/installation/windows/).
9+
The *getting started* guide on Docker has detailed instructions for setting up Docker on [Mac](https://docs.docker.com/docker-for-mac/), [Linux](https://docs.docker.com/engine/installation/linux/) and [Windows](https://docs.docker.com/docker-for-windows/).
10+
11+
*Important note* If you're using an older version of Windows or MacOS you may need to use [Docker Machine](https://docs.docker.com/machine/overview/) instead.
1012

1113
Once you are done installing Docker, test your Docker installation by running the following:
1214
```

beginner/chapters/votingapp.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
This portion of the tutorial will guide you through the creation and customization of a voting app. It's important that you follow the steps in order, and make sure to customize the portions that are customizable.
33

44
**Important.**
5-
To complete the submission, you will need to have Docker and Docker Compose installed on your machine as mentioned in the [Setup](./setup.md) section. You'll also need to have a [Docker Id](https://hub.docker.com/register/). Once you do run login from the commandline:
5+
To complete this section, you will need to have Docker and Docker Compose installed on your machine as mentioned in the [Setup](./setup.md) section. You'll also need have git installed. There are many options for installing it. For instance, you can get it from [GitHub](https://help.github.com/articles/set-up-git/).
6+
7+
You'll also need to have a [Docker Id](https://hub.docker.com/register/). Once you do run login from the commandline:
68

79
```
810
$ docker login
911
```
1012

1113
And follow the login directions. Now you can push images to Docker Hub.
1214

13-
> Note: If you encounter an error response from daemon while attempting to login, you may need to restart your machine by running `docker-machine restart <YOUR_DOCKER_MACHINE_NAME>`.
14-
1515

1616
### 3.1 Get the voting-app
1717
You now know how to build your own Docker image, so let's take it to the next level and glue things together. For this app you have to run multiple containers and Docker Compose is the best way to do that.
1818

19-
Start by quickly reading the documentation available [here](https://docs.docker.com/compose/overview/).
19+
Start by quickly reading the documentation [here](https://docs.docker.com/compose/overview/).
2020

2121
Clone the voting-app repository already available at [Github Repo](https://github.com/docker/example-voting-app.git).
2222

@@ -116,15 +116,7 @@ To launch your app navigate to the example-voting-app directory and run the foll
116116
$ docker-compose up -d
117117
```
118118

119-
This tells Compose to start all the containers specified in the `docker-compose.yml` file. The `-d` tells it to run them in daemon mode, in the background.
120-
121-
Last you'll need to figure out the ip address of your Docker host. If you're running Linux, it's just localhost, or 127.0.0.1. If you're using Docker Machine on Mac or Windows, you'll need to run:
122-
123-
```
124-
$ docker-machine ip default
125-
```
126-
127-
It'll return an IP address. If you only have one Docker Machine running, most likely, that's 192.168.99.100. We'll call that `<YOUR_IP_ADDRESS>`. Navigate to `http://<YOUR_IP_ADDRESS>:5000` in your browser, and you'll see the voting app, something like this:
119+
This tells Compose to start all the containers specified in the `docker-compose.yml` file. The `-d` tells it to run them in daemon mode, in the background. Navigate to `http://localhost:5000` in your browser, and you'll see the voting app, something like this:
128120

129121
<img src="../images/vote.png" title="vote">
130122

beginner/chapters/webapps.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The image that you are going to use is a single-page website that was already cr
1212
$ docker run -d seqvence/static-site
1313
```
1414

15-
>**Note:** The current version of this image doesn't run without the `-d` flag, although it should. The `-d` flag enables **detached mode**, which detaches the running container from the terminal/shell and returns your prompt after the container starts. We are debugging the problem with this image but for now, use `-d` even for this first example.
15+
>**Note:** The current version of this image doesn't run without the `-d` flag. The `-d` flag enables **detached mode**, which detaches the running container from the terminal/shell and returns your prompt after the container starts. We are debugging the problem with this image but for now, use `-d` even for this first example.
1616
1717
So, what happens when you run this command?
1818

@@ -65,15 +65,15 @@ $ docker port static-site
6565
80/tcp -> 0.0.0.0:32773
6666
```
6767

68-
If you are running [Docker for Mac](https://docs.docker.com/docker-for-mac/), [Docker for Windows](https://docs.docker.com/docker-for-windows/), or Docker on Linux, you can open `http://localhost:YOUR_PORT_FOR 80/tcp`. For our example this is `http://localhost:32773`.
68+
If you are running [Docker for Mac](https://docs.docker.com/docker-for-mac/), [Docker for Windows](https://docs.docker.com/docker-for-windows/), or Docker on Linux, you can open `http://localhost:[YOUR_PORT_FOR 80/tcp]`. For our example this is `http://localhost:32773`.
6969

7070
If you are using Docker Machine on Mac or Windows, you can find the hostname on the command line using `docker-machine` as follows (assuming you are using the `default` machine).
7171

7272
```
7373
$ docker-machine ip default
7474
192.168.99.100
7575
```
76-
You can now open `http://<YOUR_IPADDRESS>:YOUR_PORT_FOR 80/tcp` to see your site live! For our example, this is: `http://192.168.99.100:32773`.
76+
You can now open `http://<YOUR_IPADDRESS>:[YOUR_PORT_FOR 80/tcp]` to see your site live! For our example, this is: `http://192.168.99.100:32773`.
7777

7878
You can also run a second webserver at the same time, specifying a custom host port mapping to the container's webserver.
7979

@@ -82,9 +82,9 @@ $ docker run --name static-site-2 -e AUTHOR="Your Name" -d -p 8888:80 seqvence/s
8282
```
8383
<img src="../images/static.png" title="static">
8484

85-
I'm sure you agree that was super simple. To deploy this on a real server you would just need to install Docker, and run the above `docker` command.
85+
To deploy this on a real server you would just need to install Docker, and run the above `docker` command.
8686

87-
Now that you've seen how to run a webserver inside a Docker image, you must be wondering - how do I create my own Docker image? This is the question we'll explore in the next section.
87+
Now that you've seen how to run a webserver inside a Docker image, how do you create your own Docker image? This is the question we'll explore in the next section.
8888

8989
But first, let's stop and remove the containers since you won't be using them anymore.
9090

@@ -130,14 +130,12 @@ The above gives a list of images that I've pulled from the registry and the ones
130130

131131
For simplicity, you can think of an image akin to a git repository - images can be [committed](https://docs.docker.com/engine/reference/commandline/commit/) with changes and have multiple versions. When you do not provide a specific version number, the client defaults to `latest`.
132132

133-
For example, you can pull a specific version of `ubuntu` image as follows:
133+
For example you could pull a specific version of `ubuntu` image as follows:
134134

135135
```
136136
$ docker pull ubuntu:12.04
137137
```
138138

139-
**NOTE**: Do not execute the above command. It is only for your reference.
140-
141139
If you do not specify the version number of the image, then as mentioned the Docker client will default to a version named `latest`.
142140

143141
So for example, the `docker pull` command given below will pull an image named `ubuntu:latest`:
@@ -146,7 +144,7 @@ So for example, the `docker pull` command given below will pull an image named `
146144
$ docker pull ubuntu
147145
```
148146

149-
To get a new Docker image you can either get it from a registry (such as the docker hub) or create your own. There are tens of thousands of images available on [Docker hub](https://hub.docker.com). You can also search for images directly from the command line using `docker search`.
147+
To get a new Docker image you can either get it from a registry (such as the docker hub) or create your own. There are hundreds of thousands of images available on [Docker hub](https://hub.docker.com). You can also search for images directly from the command line using `docker search`.
150148

151149
An important distinction to be aware of when it comes to images is between base and child images.
152150

@@ -398,7 +396,7 @@ $ docker run -p 8888:5000 --name myfirstapp YOUR_USERNAME/myfirstapp
398396
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
399397
```
400398

401-
Head over to `http://<DOCKER_HOST-IP-ADDRESS>:8888` and your app should be live. You may need to open up another terminal and determine the container ip address using `docker-machine ip default`.
399+
Head over to `http://localhost:8888` and your app should be live. **note** If you are using Docker Machine, you may need to open up another terminal and determine the container ip address using `docker-machine ip default`.
402400

403401
<img src="../images/catgif.png" title="static">
404402

0 commit comments

Comments
 (0)