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

Add project name label to networks, volumes and secrets #4977

Closed
deviantony opened this issue Jun 30, 2017 · 6 comments
Closed

Add project name label to networks, volumes and secrets #4977

deviantony opened this issue Jun 30, 2017 · 6 comments

Comments

@deviantony
Copy link

It'd be interesting to have the project labels added to the networks, volumes & secrets objects created via compose.

I'm talking about the following labels here:

  • com.docker.compose.project
  • com.docker.stack.namespace

Somehow similar to #1066

@shin-
Copy link

shin- commented Jun 30, 2017

We already do so: #4220

@deviantony
Copy link
Author

Well, when I inspect the network created by compose, labels are empty.

Compose file:

version: "2"
services:
  sv1:
    image: nginx
$ docker-compose -v
docker-compose version 1.10.0, build 4bd6f1a
$ docker-compose up -d
Creating network "composev2_default" with the default driver
Creating composev2_sv1_1
$ docker inspect composev2_default 
[
    {
        "Name": "composev2_default",
        "Id": "dd4483ba1734af49fe555afee5935006107423fb0d84e9217b34326c66c77a9b",
        "Created": "2017-07-01T09:18:06.109182606+02:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.22.0.0/16",
                    "Gateway": "172.22.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "Containers": {
            "4d78b63ab23a5c649115a5d1565e7816671ce3d11a1d956e021e254049a33973": {
                "Name": "composev2_sv1_1",
                "EndpointID": "abbd882cd59b890f5dd7b947f47074664be02a8bcb8dfbcfa69acd6bf9557b9c",
                "MacAddress": "02:42:ac:16:00:02",
                "IPv4Address": "172.22.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]

@shin-
Copy link

shin- commented Jul 1, 2017

Youre using the 2.0 format. Labels are only available for v2.1 and above.

@deviantony
Copy link
Author

Indeed, that's working well with format v2.1. Any evolution planned for secrets ?

@shin-
Copy link

shin- commented Jul 5, 2017

docker-compose doesn't actually create secrets, so in our case it's not applicable.

@deviantony
Copy link
Author

Indeed, thanks for the answer. You can close this issue.

@shin- shin- closed this as completed Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants