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: ZERO.md
+17-6
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ Please **Star** the docker-arm repository to show your support. For questions se
6
6
7
7
**Overview**
8
8
9
-
With the release of the 5 dollar PI Zero computer, there has never been a better time to start building a Docker Swarm. Whether you want to try distributed computing or just build something cool with your PI Zeros.
9
+
With the release of the 5 dollar [Raspberry Pi Zero computer](https://shop.pimoroni.com/collections/raspberry-pi/products/raspberry-pi-zero), there has never been a better time to start building a Docker Swarm. Whether you want to try distributed computing or just build something cool with your Pi Zeros.
10
10
11
-
In this quick-start guide we will configure Arch Linux ARM, install Docker and then use a laptop or another PC to create a swarm which all our PI Zeros can join. There are several ways of doing this, but we'll keep things simple and give you the opportunity to take it further later on. I've provided some sample images for Node.js, Redis, Ruby and Python so once you're up and running it's over to you to create something awesome.
11
+
In this quick-start guide we will configure Arch Linux ARM or Raspbian, install Docker and then use a laptop or another PC to create a swarm which all our Pi Zeros can join. There are [several ways](https://docs.docker.com/swarm/discovery/) of doing this (called swarm discovery), but we'll keep things simple with a hard-coded list of swarm agents. You can take it further later on through the [Swarm Discovery documentation](https://docs.docker.com/swarm/discovery/). I've provided some [sample images](https://github.com/alexellis/docker-arm/tree/master/images/armv6) for Node.js, Redis, Ruby and Python so once you're up and running it's over to you to create something awesome.
12
12
13
13
* Install & configure Arch Linux ARM
14
14
* Install Docker
@@ -279,27 +279,38 @@ ADD ./main.rb ./
279
279
CMD ["ruby", "main.rb"]
280
280
```
281
281
282
+
Let's start the Ruby application, the swarm manager will find a suitable agent and start executing it.
283
+
282
284
```
283
285
$ docker build -t ruby_hello_world:v6 .
284
-
$ docker run ruby_hello_world:v6
286
+
$ docker run --name ruby_hello_1 ruby_hello_world:v6
285
287
Hello Ruby!
286
288
```
287
289
290
+
Now if you want to find out more information about the container that was started use `docker inspect` and the name of the container which we specified:
291
+
292
+
```
293
+
$ docker inspect ruby_hello_1
294
+
```
295
+
296
+
288
297
**Spreading images between the Swarm**
289
298
290
-
The easiest way to spread your images between the Swarm is to push them to the Docker Hub with `docker push` then log into each PI and use `docker pull` to bring it into the local library. If you build an image pointing at the swarm manager then the manager will pick a random PI Zero to do the build.
299
+
The easiest way to spread your images between the Swarm is to push them to the Docker Hub with `docker push` then log into each PI and use `docker pull` to bring it into the local library. If you build an image pointing at the swarm manager then the manager will pick a random Pi Zero to do the build.
291
300
292
-
The alternative method is to log into each PI and build the image from source as we did above.
301
+
The alternative method is to log into each Pi and build the image from source as we did above.
293
302
294
303
### Wrapping up
295
304
296
305
This is the end of the quick-start tutorial. You now have a fully working PI Zero Swarm and are ready to start exploring images built specifically for ARM. Please see the repository `docker-arm` over at Github for compatible ARMv6 images:
Questions? Send me a message on the blog or through Twitter at @alexellisuk.
310
+
300
311
### See also:
301
312
302
-
Additional instructions are available for the Raspberry PI 2/3, including how to set up a Swarm using *Consul* for discovery instead of using the hard-coded `nodes://` method.
313
+
Additional instructions are available for the Raspberry Pi 2/3, including how to set up a Swarm using *Consul* for discovery instead of using the hard-coded `nodes://` method.
303
314
304
315
[Docker for Raspberry PI tutorial](http://blog.alexellis.io/linux-user-developer-magazine/)
0 commit comments