(Maybe there are better solutions within boot2docker.)
For a fast solution, I recommend to do this via Vagrant.
** review this document.
https://coreos.com/docs/running-coreos/platforms/vagrant/
update config.rb
file
config.rb
# Size of the CoreOS cluster created by Vagrant
$num_instances=3
** start vagrant with three CoreOS instances.
Start the machine(s):
vagrant up
List the status of the running machines:
$ vagrant status
Current machine states:
core-01 running (virtualbox)
core-02 running (virtualbox)
core-03 running (virtualbox)
This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.
** login each instance and start the docker container
docker pull <image>
docker run ...
Another way to do that is via Docker machine
Note: Machine is currently in beta, so things are likely to change. We don't recommend you use it in production yet.
Machine makes it really easy to create Docker hosts on your computer, on cloud providers and inside your own data center. It creates servers, installs Docker on them, then configures the Docker client to talk to them.
Relative document : https://docs.docker.com/machine/