Skip to Content
Docker for Rails Developers
book

Docker for Rails Developers

by Rob Isenberg
February 2019
Intermediate to advanced
240 pages
5h 25m
English
Pragmatic Bookshelf
Content preview from Docker for Rails Developers

Our First (Single Node) Swarm

It’s time to dive deeper into Swarm and start getting our hands dirty.

Previously, we created a plain-vanilla Docker instance: local-vm-1. To turn our instance into a swarm, we have to initialize it explicitly. With our CLI targeting our new instance, we can do this by running:

 $ ​​docker​​ ​​swarm​​ ​​init​​ ​​--advertise-addr​​ ​​<IP​​ ​​address​​ ​​of​​ ​​instance>

where <IP address of instance>, in our case, is local-vm-1’s public IP address. We can easily find that out by rerunning:

 $ ​​docker-machine​​ ​​ls
 NAME … … … URL … … …
 local-vm-1 * … … tcp://192.168.99.100:2376 …

The IP address of the instance is listed in the “URL” column. For me, the IP address is 192.168.99.100, but yours will differ. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Rails 6: Accelerated Web Development with Ruby on Rails

Learn Rails 6: Accelerated Web Development with Ruby on Rails

Adam Notodikromo
Mastering Ruby Closures

Mastering Ruby Closures

Benjamin Tan Wei Hao

Publisher Resources

ISBN: 9781680506730Errata Page