Docker swarm init is only supported on a Docker cli with swarm features enabled

Getting “docker swarm init is only supported on a Docker cli with swarm features enabled” when I run
$ docker swarm init
from my docker for mac.

I enabled swarm mode for my docker account, created a swarm (AWS). Swarm is visible in Docker app on mac.

Not sure if I am missing any step regarding enabling swarm features on my local docker cli. Any suggestions??

Docker version :

Version: 17.12-kube_beta
API version: 1.35
Go version: go1.9.2
Git commit: ca0c9dbcb219048a1a61fbf82a2e69f1b9795023
Built: Fri Dec 15 10:20:47 2017
OS/Arch: darwin/amd64
Orchestrator: kubernetes

Version: 17.12.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:12:29 2017
OS/Arch: linux/amd64
Experimental: true

I have the exact same issue, how do we enable swarm mode in Docker-for-Mac?

I had the same problem, I disabled Kubernetes and docker swarm works now;

  1. You may disable Kubernetes by navigating to the Preferences pane

  2. If you would like to use Swarm simultaneously with Kubernetes, you need to set the DOCKER_ORCHESTRATOR env variable to switch to Swarm.
    So open a new terminal and execute the below commands -
    export DOCKER_ORCHESTRATOR=swarm
    docker swarm init

1 Like