Open sronsiek opened 8 years ago
If you have the images around locally you could use --swarm-image
to specify which image tag Machine should use for the Swarm image. Likewise there's no dep on generating the discovery token using Hub, it's just done that way in some examples. Just set --swarm-discovery
to the local KV store's address.
I came here to ask this same question. Even when using --swarm-image
, docker-machine
still tries to access the internet. The problem appears to be:
configureSwarm
calls mcndockerclient.CreateContainer
.mcndockerclient.CreateContainer
calls docker.PullImage
.docker.PullImage
fails, the whole operation fails and the container is not created.
docker-machine is, in part, provided to create docker swarms / clusters, with a variety for drivers available for various cloud based host-platforms.
Our use case is based on an operational environment, where internet access in not an option. My understanding was that the 'generic' driver is provided for such cases, allowing for non-cloud, physical servers in a private LAN.
In this environment it was noted that docker-machine:
Could command-line flag(s) be added to suppress internet access attempts where local images are available and possibly generate a key locally? Or would this be incorrect usage?
The discussion here shows it is possible to avoid docker-machine usage in the given scenario, but it seems a shame to need to forego intended machine functionality.
https://forums.docker.com/t/create-swarm-host-without-internet-access/16092