-
Notifications
You must be signed in to change notification settings - Fork 774
config: adding labels #371
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
Conversation
config.md
Outdated
| }, | ||
| "WorkingDir": "/home/alice" | ||
| "WorkingDir": "/home/alice", | ||
| "Labels": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indenting is off
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
Where is it specified in Docker? Only in code? |
|
yep On Thu, Oct 6, 2016 at 9:02 AM, Jonathan Boulle [email protected]
|
the "Labels" field is not specified in the docker image spec, but is present and used. https://github.com/docker/docker/blob/master/image/spec/v1.2.md This carries over that functionality Signed-off-by: Vincent Batts <[email protected]>
config.md
Outdated
| Sets the current working directory of the entrypoint process in the container. | ||
| This value acts as a default and is replaced by a working directory specified when creating a container. | ||
|
|
||
| - **Labels ** *object*, OPTIONAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space
Signed-off-by: Jonathan Boulle <[email protected]>
|
@vbatts how can we be confident we aren't missing other fields that are present, used, but only defined in code? |
|
@vbatts @jonboulle @philips From what I know, there are concepts of Not related to this, I'm always curious about why we only have So I'm just wondering should we add are all the missing but used and present filed of docker image to the config of spec and also removing |
|
On Sat, Oct 08, 2016 at 01:28:59AM -0700, Lei Jitang wrote:
The problem here is that “portable container runtime config” is a If that's too big a departure from the current Docker approach to fit |
|
@jonboulle we can be reasonably certain that there are other fields that are not defined, but only in code. |
|
@coolljt0725 on that note, I would be fine seeing Memory* and CPU* removed from the OCI image spec. Further, having an annotation that provides a hint for memory and CPU demands of the contained application. |
|
I'm tagging this for the v1.0.0-rc3 milestone, because it is needed for compatibility and it is something that the ecosystem has grown to depend on. |
|
@opencontainers/image-spec-maintainers PTAL |
|
@vbatts I'm not quite sure what exactly is going on here with the extra fields. Relevant code is in https://github.com/docker/docker/blob/2a2f183627af25fb6f1c93c5fc2c4d04ab7e75bb/daemon/commit.go#L196. The interesting one to me is Regarding labels, we need to be careful about the semantics of label inheritance. It is not well-defined in docker, at all, and there are some tricky situations to address, such as removing labels. It may be sufficient to say to inheritance model isn't specified, but we should at least study the problem. For the most part, these missing fields are of little consequence, as docker maintains the original byte content, rather than relying on serialization round trips. |
|
@stevvooe i really do not follow you regarding "if these are applied at runtime". What are you expecting? Because it seems to me you are describing something more than just arbitrary metadata, which is the perception labels have to the majority of folks I have seen using them. It is not like an environment variable or something that is exposed into the container. |
|
@vbatts I would not expect that labels on image be applied to a running container. With the way labels are used, it is a massive security hole. Unfortunately, looks like that cat is out of the bag: https://github.com/docker/docker/blob/2a2f183627af25fb6f1c93c5fc2c4d04ab7e75bb/daemon/commit.go#L67. |
|
I am not seeing this massive security hole. :-\ Is this cat the one regarding inheritance of labels? If so, it is as I On Thu, Nov 3, 2016 at 4:09 PM Stephen Day [email protected] wrote:
|
|
LGTM
Let's say I have a label-based load balancer or ACL system. One can then craft an image such that the label on the image will cause the created container to join the load balancing group or gain privileges that it doesn't already have. This cat has outgrown the bag, so I'm not sure there is much to do from OCI's perspective. |
|
@philips PTAL |
As I said in opencontainers#371 (comment), I'd like to remove these resource limit from image-spec. On the on hand, if we have this, we should have limit the min and max size of these value. For example, in docker, there are some min and max limit for some resource, see https://github.com/docker/docker/blob/master/daemon/daemon_unix.go#L48 Signed-off-by: Lei Jitang <[email protected]>
As I said in opencontainers/image-spec#371 (comment), I'd like to remove these resource limit from image-spec. On the on hand, if we have this, we should have limit the min and max size of these value. For example, in docker, there are some min and max limit for some resource, see https://github.com/docker/docker/blob/master/daemon/daemon_unix.go#L48 Signed-off-by: Lei Jitang <[email protected]>
As I said in opencontainers/image-spec#371 (comment), I'd like to remove these resource limit from image-spec. On the on hand, if we have this, we should have limit the min and max size of these value. For example, in docker, there are some min and max limit for some resource, see https://github.com/docker/docker/blob/master/daemon/daemon_unix.go#L48 Signed-off-by: Lei Jitang <[email protected]>
As I said in opencontainers/image-spec#371 (comment), I'd like to remove these resource limit from image-spec. On the on hand, if we have this, we should have limit the min and max size of these value. For example, in docker, there are some min and max limit for some resource, see https://github.com/docker/docker/blob/master/daemon/daemon_unix.go#L48 Signed-off-by: Lei Jitang <[email protected]>
As I said in opencontainers/image-spec#371 (comment), I'd like to remove these resource limit from image-spec. On the on hand, if we have this, we should have limit the min and max size of these value. For example, in docker, there are some min and max limit for some resource, see https://github.com/docker/docker/blob/master/daemon/daemon_unix.go#L48 Signed-off-by: Lei Jitang <[email protected]>
As I said in opencontainers/image-spec#371 (comment), I'd like to remove these resource limit from image-spec. On the on hand, if we have this, we should have limit the min and max size of these value. For example, in docker, there are some min and max limit for some resource, see https://github.com/docker/docker/blob/master/daemon/daemon_unix.go#L48 Signed-off-by: Lei Jitang <[email protected]>
the "Labels" field is not specified in the docker image spec, but is
present and used.
https://github.com/docker/docker/blob/master/image/spec/v1.2.md
This carries over that functionality
Signed-off-by: Vincent Batts [email protected]