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

[Carry 18926] Add network internal mode #19276

Merged
merged 1 commit into from Jan 13, 2016
Merged

Conversation

calavera
Copy link
Contributor

Carry #18926.

/cc @thaJeztah, @vdemeester

Signed-off-by: Chun Chen ramichen@tencent.com
Signed-off-by: David Calavera david.calavera@gmail.com

@calavera calavera added this to the 1.10.0 milestone Jan 12, 2016
@thaJeztah thaJeztah changed the title [Carry 18926] Add network interal mode [Carry 18926] Add network internal mode Jan 12, 2016
@@ -113,6 +113,7 @@ This section lists each version from latest to oldest. Each listing includes a
* `GET /networks` now supports filtering by `name`, `id` and `type`.
* `POST /containers/create` now allows you to set the static IPv4 and/or IPv6 address for the container.
* `POST /networks/(id)/connect` now allows you to set the static IPv4 and/or IPv6 address for the container.
* `POST /networks/create` now supports restricting external access to the network by setting a `internal` field.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤘

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an internal field... but the CI is almost green lol

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually this should be the internal field, as @calavera privately suggested to me

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, yes, I only looked at the missing ., haha

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replaced with the, because it's a specific field, not any, like a or an might suggest.

@thaJeztah
Copy link
Member

LGTM

@tiborvass
Copy link
Contributor

apart from small nit, LGTM

@chenchun
Copy link
Contributor

Thanks for carrying this.

@xiangpengzhao
Copy link

All the existing [OPTIONS] of docker network create command (and almost other docker commands) are in the format as --option_name=option_value, so should we give the option --internal the same format as --internal=bool?

I think this will keep unify style of commands and help users to understand the option better.

@calavera @chenchun

@thaJeztah
Copy link
Member

@xiangpengzhao we no longer show =false on boolean flags. See #18082

@xiangpengzhao
Copy link

Sorry for not noticing that issue:sweat_smile:
@thaJeztah

@sdurrheimer
Copy link
Contributor

ping @albers future docker network create --internal flag

@@ -22,6 +22,7 @@ parent = "smn_cli"
--ipam-driver=default IP Address Management Driver
-o --opt=map[] Set custom network plugin options
--subnet=[] Subnet in CIDR format that represents a network segment
--internal Restricts external access to the network
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be upwards, just before --ip-range.

@vdemeester
Copy link
Member

Small nits that could be done before merging (that's why I did put it back into docs review 😝)

@thaJeztah
Copy link
Member

good catch, @vdemeester

@icecrime
Copy link
Contributor

Also needs a rebase 🐱

Signed-off-by: Chun Chen <ramichen@tencent.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
@calavera
Copy link
Contributor Author

fixed comments and rebased

@vdemeester
Copy link
Member

docs LGTM 🐹

@calavera
Copy link
Contributor Author

all 💚 🎉

@alvinr
Copy link
Contributor

alvinr commented Jan 21, 2016

Not clear if this was intentional, but with --internal specified then the ports exposed do do appear in docker inspect. This breaks docker ps which shows empty values and utilities like interlock for HAproxy configuration.

Without --internal then you see the following stanza. This is excluded with the --internal flag.

        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "45f20f5d699fe7fa7ea5ac95217ebea5b3cc47fd62202d8f430646e6d43e2a00",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "5000/tcp": [
                    {
                        "HostIp": "172.16.145.155",
                        "HostPort": "32768"
                    }
                ]
            },

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

Successfully merging this pull request may close these issues.

None yet

10 participants