Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker network support for docker provider #6667

Closed
modius opened this issue Dec 15, 2015 · 9 comments
Closed

docker network support for docker provider #6667

modius opened this issue Dec 15, 2015 · 9 comments

Comments

@modius
Copy link

modius commented Dec 15, 2015

Is there an ETA for docker network support for the Docker provider?

While links are still supported in this limited capacity, you should avoid them in preference of Docker networks. The link feature is expected to be deprecated and removed in a future release.

https://docs.docker.com/engine/userguide/networking/dockernetworks/

@bogdando
Copy link

Very good point!
For now, I have to deal with w/a like to create a network manually:

# docker network create -d bridge --internal --ip-range=a.b.c.0/24 --subnet=a.b.c.0/24 foo

and then use an ugly hack to run the container in the foo network, for example:

config.vm.provider :docker do |d|
  d.image = "bar/qux"
  d.name = n1
  d.has_ssh = true
  d.cmd = ["/usr/sbin/sshd", "-D"]
  d.create_args = ["-i", "-t", "--net=rabbits"]
end

So, would nice to have this implemented in a more friendly way with "vm.network " configuraion instead of manual steps to create/destroy the net

@teohhanhui
Copy link

Use Docker Compose? :)

@modius
Copy link
Author

modius commented Mar 4, 2016

Aye. Been working on some scripts to set up docker-machine and docker-compose to emulate the provisioning we currently do in Vagrant.

@bogdando
Copy link

But emulating is only a w/a, I have one for my case as well. But that is not a fix.

@teohhanhui
Copy link

You can use Docker Compose with Vagrant (that's what I do). Someone even made a plugin to simplify things :)

https://github.com/leighmcculloch/vagrant-docker-compose

@bogdando
Copy link

@teohhanhui it is the provisioner. It cannot configure networks for the docker provider

@teohhanhui
Copy link

Uhh I gave up pretty quickly the first time I tried the Docker provider (I need a consistent cross-platform solution anyway, so a good-old VM it is)

@chrisroberts chrisroberts added this to the 2.0 milestone Oct 3, 2016
@chrisroberts chrisroberts modified the milestones: 1.10, 1.9.0 Oct 26, 2016
@chrisroberts chrisroberts modified the milestones: 1.9, 1.9.0 Nov 8, 2016
@chrisroberts
Copy link
Member

Closing via #8576

@ghost
Copy link

ghost commented Apr 2, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants