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: beginner/chapters/setup.md
+5-1
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,14 @@ There are no specific skills needed for this tutorial beyond a basic comfort wit
6
6
### Setting up your computer
7
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.
8
8
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/).
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
+
*If you're using Docker for Windows* make sure you have [shared your drive](https://docs.docker.com/docker-for-windows/#/shared-drives).
10
12
11
13
*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.
12
14
15
+
*All commandline work in either bash or Powershell on Windows*
16
+
13
17
Once you are done installing Docker, test your Docker installation by running the following:
Copy file name to clipboardExpand all lines: beginner/chapters/votingapp.md
+7-9
Original file line number
Diff line number
Diff line change
@@ -33,15 +33,15 @@ In the folder ```example-voting-app/voting-app``` you need to edit the app.py an
33
33
Edit the following lines:
34
34
35
35
```
36
-
option_a = os.getenv('OPTION_A', "Java")
37
-
option_b = os.getenv('OPTION_B', "Python")
36
+
option_a = os.getenv('OPTION_A', "Cats")
37
+
option_b = os.getenv('OPTION_B', "Dogs")
38
38
```
39
39
40
40
substituting two options of your choice. For instance:
41
41
42
42
```
43
-
option_a = os.getenv('OPTION_A', "Cats")
44
-
option_b = os.getenv('OPTION_B', "Dogs")
43
+
option_a = os.getenv('OPTION_A', "Java")
44
+
option_b = os.getenv('OPTION_B', ".NET")
45
45
```
46
46
#### 3.2.2 Running your app
47
47
Now, run your application. To do that, we'll use [Docker Compose](https://docs.docker.com/compose). Docker Compose is a tool for defining and running multi-container Docker applications. With Compose, you define a `.yml` file that describes all the containers and volumes that you want, and the networks between them. In the example-voting-app directory, you'll see a `docker-compose.yml file`:
@@ -71,9 +71,7 @@ services:
71
71
- back-tier
72
72
73
73
worker:
74
-
image: manomarks/worker
75
-
networks:
76
-
- back-tier
74
+
build: ./worker
77
75
78
76
redis:
79
77
image: redis:alpine
@@ -103,10 +101,10 @@ This Compose file defines
103
101
- A voting-app container based on a Python image
104
102
- A result-app container based on a Node.js image
105
103
- A redis container based on a redis image, to temporarily store the data.
106
-
- A Java based worker app based on a Java image
104
+
- A .NET based worker app based on a .NET image
107
105
- A Postgres container based on a postgres image
108
106
109
-
Note that three of the containers are built from Dockerfiles, while the other two are images on Docker Hub. To learn more about how they're built, you can examine each of the Dockerfiles in the two directories: `voting-app`, `result-app`. We included the code for the Java worker in `worker` but pre-built the image to save on downloads.
107
+
Note that three of the containers are built from Dockerfiles, while the other two are images on Docker Hub. To learn more about how they're built, you can examine each of the Dockerfiles in the three directories: `vote`, `result`, `worker`.
110
108
111
109
The Compose file also defines two networks, front-tier and back-tier. Each container is placed on one or two networks. Once on those networks, they can access other services on that network in code just by using the name of the service. To learn more about networking check out the [Networking with Compose documentation](https://docs.docker.com/compose/networking/).
Copy file name to clipboardExpand all lines: swarm-mode/README.md
+1-2
Original file line number
Diff line number
Diff line change
@@ -3,5 +3,4 @@
3
3
[Docker Swarm Mode](https://docs.docker.com/engine/swarm/) is a release candidate feature included with Docker Engine 1.12. These tutorials are designed to help you quickly get started testing these new features.
4
4
5
5
*[Docker Swarm Mode full tutorial](beginner-tutorial/README.md)
Copy file name to clipboardExpand all lines: swarm-mode/cloud-quick-start/swarm.sh
+11-9
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
+
# This will run in bash on Linux, Mac, and Windows 10 Anniverary Edition
1
2
# Default cluster:
2
3
# - 3 manager node
3
4
# - 5 worker nodes
4
5
# - 5 replicas for the test service
5
6
# - service image: ehazlett/docker-demo
6
7
# - service port: 8080 (port exposed by the service)
7
8
# - exposed port: 8080 (port exposed to the outside)
9
+
8
10
DRIVER="virtualbox"
9
11
NBR_MANAGER=3
10
12
NBR_WORKER=5
@@ -82,7 +84,7 @@ while [ "$#" -gt 0 ]; do
82
84
--azure-subscription-id)
83
85
AZURE_SUBSCRIPTION_ID="$2"
84
86
shift 2
85
-
;;
87
+
;;
86
88
-h|--help)
87
89
usage
88
90
;;
@@ -116,7 +118,7 @@ if [ "$DRIVER" == "amazonec2" ];then
116
118
if [ "$EC2_SECURITY_GROUP"=="" ];then
117
119
error "--amazonec2-security-group must be provided (+ make sure this one allows inter hosts communication and is has opened port $EXPOSED_PORT to the outside"
0 commit comments