{"action":"closed","issue":{"url":"https://api.github.com/repos/pulumi/pulumi-docker/issues/30","repository_url":"https://api.github.com/repos/pulumi/pulumi-docker","labels_url":"https://api.github.com/repos/pulumi/pulumi-docker/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/pulumi/pulumi-docker/issues/30/comments","events_url":"https://api.github.com/repos/pulumi/pulumi-docker/issues/30/events","html_url":"https://github.com/pulumi/pulumi-docker/issues/30","id":370835533,"node_id":"MDU6SXNzdWUzNzA4MzU1MzM=","number":30,"title":"Switch away from needing a real repository Digest over to using just a 'docker image id'","user":{"login":"CyrusNajmabadi","id":4564579,"node_id":"MDQ6VXNlcjQ1NjQ1Nzk=","avatar_url":"https://avatars3.githubusercontent.com/u/4564579?v=4","gravatar_id":"","url":"https://api.github.com/users/CyrusNajmabadi","html_url":"https://github.com/CyrusNajmabadi","followers_url":"https://api.github.com/users/CyrusNajmabadi/followers","following_url":"https://api.github.com/users/CyrusNajmabadi/following{/other_user}","gists_url":"https://api.github.com/users/CyrusNajmabadi/gists{/gist_id}","starred_url":"https://api.github.com/users/CyrusNajmabadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CyrusNajmabadi/subscriptions","organizations_url":"https://api.github.com/users/CyrusNajmabadi/orgs","repos_url":"https://api.github.com/users/CyrusNajmabadi/repos","events_url":"https://api.github.com/users/CyrusNajmabadi/events{/privacy}","received_events_url":"https://api.github.com/users/CyrusNajmabadi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-16T23:09:47Z","updated_at":"2018-11-01T20:32:57Z","closed_at":"2018-11-01T20:32:57Z","author_association":"CONTRIBUTOR","body":"Right now, we expose a docker repository's digest as part of our docker.Image API.  This is problematic as this is both hard to get, and requires actual communication with a repository to compute.  \r\n\r\nThe virtue of the digest though is that it is completely unique and is the best representation of the pushed image that anything else can depend on.\r\n\r\nA way we can avoid doing this is do just use docker's image id and use that info instead.  This information is available locally using 'docker image inspect' and can then be used by pulumi.  To that end, we intend to take the image-id, and then encode that as a 'tag' for a image.  i.e. say we build a docker image, producing an image-id 'abcdef'.  We'd then push the image with the name `basename/name:abcdef`.  \r\n\r\nThis has certain benefits:\r\n\r\n1. we can dependably compute this information locally.  \r\n2. this information can be passed to someone else and used as a fully unique name for this pushed image (it should be as good as the repo digest version)\r\n3. if anything changes this ID will change and will cause an update.\r\n4. we no longer need to do things like encode the image-id into the 'environment' property like we do in cloud-aws/azure.\r\n\r\nThe downsides are:\r\n\r\n1. This is pretty redundant with the digest that a normal docker repository creates.\r\n2. users will be able to see these additionally tagged builds in their list of docker builds in the repository.\r\n3. if the user provides their own tag as well, we'll end up having push twice.  i.e. if the user's image name is `basename/name:dev` we'll have to push both that *and* `basename/name:dev-abcdef`.  This isn't necessary normally, as repositories will normally give you a 'latest' tag that points to the last thing you pushed.\r\n\r\nOverall, while there are a few cons, they don't seem that bad, and we believe they're far outweighed by the pros.\r\n\r\n"}}
{"actor":{"display_login":"CyrusNajmabadi"}}