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

Overlay networks can't be specified with network_mode and are not attachable #932

Open
kevenwyld opened this issue Oct 20, 2017 · 0 comments

Comments

@kevenwyld
Copy link

kevenwyld commented Oct 20, 2017

Cookbook version

2.16.2

Chef-client version

12.21.10

Platform Details

NAME="Red Hat Enterprise Linux Server"
VERSION="7.4 (Maipo)"

platform vmware

Scenario:

Provisioning a network with mode attachable or configuring a container to connect to a custom network with the overlay driver.

Steps to Reproduce:

Attempt to provision an custom network and a container as follows:

docker_image 'alpine'

docker_network 'testnet' do
  driver 'overlay'
  internal true
  subnet '10.0.0.0/24'
  gateway '10.0.0.1'
  action :create
end

docker_container 'alpine01' do
  repo 'alpine'
  tag 'latest'
  ip_address '10.0.0.5'
  network_mode 'testnet'
  command 'top'
end

Expected Result:

The network testnet is created and a container called alpine01 is started connected to testnet with the ip 10.0.0.5.

Actual Result:

The container fails to start with the error:

"Could not attach to network testnet: rpc error: code = PermissionDenied desc = network testnet not manually attachable",

Additional notes:

I also attempted to create the network as attachable however the attachable parameter does not seem to be supported so all networks which are provisioned with the driver overlay are set "Attachable": false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants