{"action":"created","issue":{"url":"https://api.github.com/repos/appc/docker2aci/issues/189","repository_url":"https://api.github.com/repos/appc/docker2aci","labels_url":"https://api.github.com/repos/appc/docker2aci/issues/189/labels{/name}","comments_url":"https://api.github.com/repos/appc/docker2aci/issues/189/comments","events_url":"https://api.github.com/repos/appc/docker2aci/issues/189/events","html_url":"https://github.com/appc/docker2aci/issues/189","id":168866608,"number":189,"title":"Layer ordering is somehow wrong on API v2.2","user":{"login":"iaguis","id":507354,"avatar_url":"https://avatars.githubusercontent.com/u/507354?v=3","gravatar_id":"","url":"https://api.github.com/users/iaguis","html_url":"https://github.com/iaguis","followers_url":"https://api.github.com/users/iaguis/followers","following_url":"https://api.github.com/users/iaguis/following{/other_user}","gists_url":"https://api.github.com/users/iaguis/gists{/gist_id}","starred_url":"https://api.github.com/users/iaguis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iaguis/subscriptions","organizations_url":"https://api.github.com/users/iaguis/orgs","repos_url":"https://api.github.com/users/iaguis/repos","events_url":"https://api.github.com/users/iaguis/events{/privacy}","received_events_url":"https://api.github.com/users/iaguis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/appc/docker2aci/labels/kind/bug","name":"kind/bug","color":"ff0000"},{"url":"https://api.github.com/repos/appc/docker2aci/labels/priority/P0","name":"priority/P0","color":"df0101"}],"state":"open","locked":false,"assignee":{"login":"dgonyeo","id":2439413,"avatar_url":"https://avatars.githubusercontent.com/u/2439413?v=3","gravatar_id":"","url":"https://api.github.com/users/dgonyeo","html_url":"https://github.com/dgonyeo","followers_url":"https://api.github.com/users/dgonyeo/followers","following_url":"https://api.github.com/users/dgonyeo/following{/other_user}","gists_url":"https://api.github.com/users/dgonyeo/gists{/gist_id}","starred_url":"https://api.github.com/users/dgonyeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgonyeo/subscriptions","organizations_url":"https://api.github.com/users/dgonyeo/orgs","repos_url":"https://api.github.com/users/dgonyeo/repos","events_url":"https://api.github.com/users/dgonyeo/events{/privacy}","received_events_url":"https://api.github.com/users/dgonyeo/received_events","type":"User","site_admin":false},"assignees":[{"login":"dgonyeo","id":2439413,"avatar_url":"https://avatars.githubusercontent.com/u/2439413?v=3","gravatar_id":"","url":"https://api.github.com/users/dgonyeo","html_url":"https://github.com/dgonyeo","followers_url":"https://api.github.com/users/dgonyeo/followers","following_url":"https://api.github.com/users/dgonyeo/following{/other_user}","gists_url":"https://api.github.com/users/dgonyeo/gists{/gist_id}","starred_url":"https://api.github.com/users/dgonyeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgonyeo/subscriptions","organizations_url":"https://api.github.com/users/dgonyeo/orgs","repos_url":"https://api.github.com/users/dgonyeo/repos","events_url":"https://api.github.com/users/dgonyeo/events{/privacy}","received_events_url":"https://api.github.com/users/dgonyeo/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/appc/docker2aci/milestones/16","html_url":"https://github.com/appc/docker2aci/milestones/v0.12.3","labels_url":"https://api.github.com/repos/appc/docker2aci/milestones/16/labels","id":1909738,"number":16,"title":"v0.12.3","description":null,"creator":{"login":"iaguis","id":507354,"avatar_url":"https://avatars.githubusercontent.com/u/507354?v=3","gravatar_id":"","url":"https://api.github.com/users/iaguis","html_url":"https://github.com/iaguis","followers_url":"https://api.github.com/users/iaguis/followers","following_url":"https://api.github.com/users/iaguis/following{/other_user}","gists_url":"https://api.github.com/users/iaguis/gists{/gist_id}","starred_url":"https://api.github.com/users/iaguis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iaguis/subscriptions","organizations_url":"https://api.github.com/users/iaguis/orgs","repos_url":"https://api.github.com/users/iaguis/repos","events_url":"https://api.github.com/users/iaguis/events{/privacy}","received_events_url":"https://api.github.com/users/iaguis/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2016-07-28T14:58:37Z","updated_at":"2016-08-02T11:52:55Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-08-02T11:52:55Z","updated_at":"2016-08-02T17:22:29Z","closed_at":null,"body":"On 8a76b33 (right before we merged https://github.com/appc/docker2aci/pull/176):\r\n\r\n```\r\n$ docker2aci --version\r\ndocker2aci version v0.11.1-4-g8a76b33\r\nappc version 0.8.2\r\n$ docker2aci docker://nginx\r\nDownloading sha256:51d229e136d [=============================] 19.8 MB / 19.8 MB\r\nDownloading sha256:51f5c6a04d8 [=============================] 51.4 MB / 51.4 MB\r\nDownloading sha256:a3ed95caeb0 [=============================]       32 B / 32 B\r\nDownloading sha256:a3ed95caeb0 [=============================]       32 B / 32 B\r\nDownloading sha256:bcd41daec8c [=============================]     194 B / 194 B\r\nDownloading sha256:a3ed95caeb0 [=============================]       32 B / 32 B\r\nDownloading sha256:a3ed95caeb0 [=============================]       32 B / 32 B\r\nDownloading sha256:a3ed95caeb0 [=============================]       32 B / 32 B\r\n\r\nConverted ports:\r\n\tname: \"443-tcp\", protocol: \"tcp\", port: 443, count: 1, socketActivated: false\r\n\tname: \"80-tcp\", protocol: \"tcp\", port: 80, count: 1, socketActivated: false\r\n\r\nGenerated ACI(s):\r\nlibrary-nginx-latest.aci\r\n$ tar xvf library-nginx-latest.aci rootfs/etc/passwd\r\nrootfs/etc/passwd\r\n$ grep nginx rootfs/etc/passwd\r\nnginx:x:104:107:nginx user,,,:/nonexistent:/bin/false\r\n```\r\n\r\nWith current master:\r\n\r\n```\r\n$ docker2aci --version\r\ndocker2aci version v0.12.2-2-g54c5d94\r\nappc version 0.8.5\r\n$ docker2aci docker://nginx\r\nDownloading sha256:a3ed95caeb0 [=============================]       32 B / 32 B\r\nDownloading sha256:a3ed95caeb0 [=============================]       32 B / 32 B\r\nDownloading sha256:51f5c6a04d8 [=============================] 51.4 MB / 51.4 MB\r\nDownloading sha256:bcd41daec8c [=============================]     194 B / 194 B\r\nDownloading sha256:a3ed95caeb0 [=============================]       32 B / 32 B\r\nDownloading sha256:a3ed95caeb0 [=============================]       32 B / 32 B\r\nDownloading sha256:a3ed95caeb0 [=============================]       32 B / 32 B\r\nDownloading sha256:51d229e136d [=============================] 19.8 MB / 19.8 MB\r\n\r\nConverted ports:\r\n\tname: \"443-tcp\", protocol: \"tcp\", port: 443, count: 1, socketActivated: false\r\n\tname: \"80-tcp\", protocol: \"tcp\", port: 80, count: 1, socketActivated: false\r\n\r\nGenerated ACI(s):\r\nlibrary-nginx-latest.aci\r\n$ tar xvf library-nginx-latest.aci rootfs/etc/passwd\r\nrootfs/etc/passwd\r\n$ grep nginx rootfs/etc/passwd\r\n$\r\n```\r\n\r\ncc @dgonyeo "},"comment":{"url":"https://api.github.com/repos/appc/docker2aci/issues/comments/236976737","html_url":"https://github.com/appc/docker2aci/issues/189#issuecomment-236976737","issue_url":"https://api.github.com/repos/appc/docker2aci/issues/189","id":236976737,"user":{"login":"lucab","id":98086,"avatar_url":"https://avatars.githubusercontent.com/u/98086?v=3","gravatar_id":"","url":"https://api.github.com/users/lucab","html_url":"https://github.com/lucab","followers_url":"https://api.github.com/users/lucab/followers","following_url":"https://api.github.com/users/lucab/following{/other_user}","gists_url":"https://api.github.com/users/lucab/gists{/gist_id}","starred_url":"https://api.github.com/users/lucab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucab/subscriptions","organizations_url":"https://api.github.com/users/lucab/orgs","repos_url":"https://api.github.com/users/lucab/repos","events_url":"https://api.github.com/users/lucab/events{/privacy}","received_events_url":"https://api.github.com/users/lucab/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T17:22:29Z","updated_at":"2016-08-02T17:22:29Z","body":"I was looking at that v2.2 image and its non-squashed resulting ACI. The dependency chain seems to match in reverse order, *except for the topmost which is retained as the target*.\r\n\r\nFrom the v2.2 manifest:\r\n```\r\n{\r\n    \"schemaVersion\": 2,\r\n    \"mediaType\": \"application/vnd.docker.distribution.manifest.v2+json\",\r\n    \"config\": {\r\n        \"mediaType\": \"application/octet-stream\",\r\n        \"size\": 3915,\r\n        \"digest\": \"sha256:0d409d33b27e47423b049f7f863faa08655a8c901749c2b25b93ca67d01a470d\"\r\n    },\r\n    \"layers\": [\r\n        {\r\n            \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\r\n            \"size\": 51356334,\r\n            \"digest\": \"sha256:51f5c6a04d83efd2d45c5fd59537218924bc46705e3de6ffc8bc07b51481610b\"\r\n        },\r\n        {\r\n            \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\r\n            \"size\": 32,\r\n            \"digest\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n        },\r\n        {\r\n            \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\r\n            \"size\": 32,\r\n            \"digest\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n        },\r\n        {\r\n            \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\r\n            \"size\": 32,\r\n            \"digest\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n        },\r\n        {\r\n            \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\r\n            \"size\": 19827898,\r\n            \"digest\": \"sha256:51d229e136d0acdb3db7fae7e02d07bcb9b6ffb9bcaac88cc26aaf0be8bea045\"\r\n        },\r\n        {\r\n            \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\r\n            \"size\": 194,\r\n            \"digest\": \"sha256:bcd41daec8cc835577e660ddef75e655f6ff3742bad92c9c498d8eba097b512a\"\r\n        },\r\n        {\r\n            \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\r\n            \"size\": 32,\r\n            \"digest\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n        },\r\n        {\r\n            \"mediaType\": \"application/vnd.docker.image.rootfs.diff.tar.gzip\",\r\n            \"size\": 32,\r\n            \"digest\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n        }\r\n    ],\r\n    \"annotations\": null\r\n}\r\n\r\n```\r\n\r\nAfter ACI conversion:\r\n```\r\n\"value\": \"sha256:51f5c6a04d83efd2d45c5fd59537218924bc46705e3de6ffc8bc07b51481610b\"\r\n      \"imageName\": \"registry-1.docker.io/library/nginx-sha256-a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\",\r\n      \"imageName\": \"registry-1.docker.io/library/nginx-sha256-a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\",\r\n      \"imageName\": \"registry-1.docker.io/library/nginx-sha256-bcd41daec8cc835577e660ddef75e655f6ff3742bad92c9c498d8eba097b512a\",\r\n      \"imageName\": \"registry-1.docker.io/library/nginx-sha256-51d229e136d0acdb3db7fae7e02d07bcb9b6ffb9bcaac88cc26aaf0be8bea045\",\r\n      \"imageName\": \"registry-1.docker.io/library/nginx-sha256-a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\",\r\n      \"imageName\": \"registry-1.docker.io/library/nginx-sha256-a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\",\r\n      \"imageName\": \"registry-1.docker.io/library/nginx-sha256-a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\",\r\n```\r\n\r\nIt looks like layers come a populated `/etc/passwd`: the topmost (51f5c6a) and an intermediate one (51d229e). The issue seems to be that only the intermediate one contains the `nginx` user while the topmost doesn't, but in the resulting image the topmost is shadowing it.\r\n\r\n"}}
{"actor":{"display_login":"lucab"}}