Question

Creating docker swarm droplets with Digital Ocean API using Docker for Windows on W10 Pro?

Posted November 7, 2017 2.9k views
CentOSDocker

Hi DO Community,

I’m new to DO & creating docker swarms, just getting to grips with the DO API and noticed a large amount of information around using docker-machine using the older local docker-machine.exe.

I’m trying to create a new docker swarm but using “docker service create....” instead of docker-machine.

I have a token and can create using the docker-machine approach as per the following tutorial, but i am unable to create droplets in a similar fashion using my main Docker version on Windows 10 Pro using Powershell.

Tutorial:
https://www.digitalocean.com/community/tutorials/how-to-create-a-cluster-of-docker-containers-with-docker-swarm-and-digitalocean-on-centos-7

I believe the docker command should be something along the lines of:

docker service create \
--name swarm_0 \
--hostname swarm_0_master \
--replicas 3 \
--digitalocean-image centos-7-x64 \
--digitalocean-access-token $TOKEN

Any pointers appreciated.

Enviornment:

  • Windows 10 Pro
  • Docker for Windows Version 17.09.0-ce-win33 (13620)
  • Git Bash
  • PuTTY & PuTTYgen
  • Powershell
  • Hyper-V

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hello,

You can follow these step by step guide on how to create a cluster of Docker containers with Docker Swarm and DigitalOcean:

https://www.digitalocean.com/community/tutorials/how-to-create-a-cluster-of-docker-containers-with-docker-swarm-and-digitalocean-on-ubuntu-16-04

Hope that this helps!
Regards,
Bobby

by finid
Docker Swarm is the Docker-native solution for deploying a cluster of Docker hosts. You can use it to quickly deploy a cluster of Docker hosts running either on your local machine or on supported cloud platforms. Before...
Submit an Answer