{"action":"closed","issue":{"url":"https://api.github.com/repos/buildpack/pack/issues/80","repository_url":"https://api.github.com/repos/buildpack/pack","labels_url":"https://api.github.com/repos/buildpack/pack/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/buildpack/pack/issues/80/comments","events_url":"https://api.github.com/repos/buildpack/pack/issues/80/events","html_url":"https://github.com/buildpack/pack/issues/80","id":390766213,"node_id":"MDU6SXNzdWUzOTA3NjYyMTM=","number":80,"title":"Layers are not owned by pack user in app image","user":{"login":"djoyahoy","id":11904287,"node_id":"MDQ6VXNlcjExOTA0Mjg3","avatar_url":"https://avatars3.githubusercontent.com/u/11904287?v=4","gravatar_id":"","url":"https://api.github.com/users/djoyahoy","html_url":"https://github.com/djoyahoy","followers_url":"https://api.github.com/users/djoyahoy/followers","following_url":"https://api.github.com/users/djoyahoy/following{/other_user}","gists_url":"https://api.github.com/users/djoyahoy/gists{/gist_id}","starred_url":"https://api.github.com/users/djoyahoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djoyahoy/subscriptions","organizations_url":"https://api.github.com/users/djoyahoy/orgs","repos_url":"https://api.github.com/users/djoyahoy/repos","events_url":"https://api.github.com/users/djoyahoy/events{/privacy}","received_events_url":"https://api.github.com/users/djoyahoy/received_events","type":"User","site_admin":false},"labels":[{"id":974302854,"node_id":"MDU6TGFiZWw5NzQzMDI4NTQ=","url":"https://api.github.com/repos/buildpack/pack/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-13T16:47:46Z","updated_at":"2018-12-18T23:02:09Z","closed_at":"2018-12-18T23:02:09Z","author_association":"NONE","body":"Running `.bin/pack build test2 -p integration/fixtures/simple_app_vendored/ --buildpack /tmp/459196702/ --buildpack /tmp/buildpack_19844121cb0f61387e2615bd/` results in an app image with the following permissions (which shows that the buildpack layers are owned by root):\r\n```\r\nroot@9f6121132aff:/workspace# ls -al\r\ntotal 0\r\ndrwxr-xr-x 1 pack pack 148 Dec 13 16:35 .\r\ndrwxr-xr-x 1 root root 188 Dec 13 16:35 ..\r\ndrwxr-xr-x 1 pack pack 114 Dec 13 16:35 app\r\ndrwxr-xr-x 1 pack pack  26 Dec 13 16:35 config\r\ndrw------- 1 root root   8 Dec 13 16:35 org.cloudfoundry.buildpacks.nodejs\r\ndrw------- 1 root root  14 Dec 13 16:35 org.cloudfoundry.buildpacks.npm\r\n```\r\n\r\nDocker inspect of the builder image shows the proper environment variables are set for the pack user:\r\n```\r\nroot@2b65ee23-4861-433c-775d-86648d1df5d9:/tmp/build/db8923fc/buildpack# docker inspect packs/samples:v3alpha2\r\n[\r\n    {\r\n        \"Id\": \"sha256:fae32510fe44f9c0885e5f922323fac4f46a2c1c351d1761b8eee4c5785f3b27\",\r\n        \"RepoTags\": [\r\n            \"packs/samples:v3alpha2\"\r\n        ],\r\n        \"RepoDigests\": [\r\n            \"packs/samples@sha256:675d0288b54926e5bf36a404c48ba1a5833ff08ca529c47b7c7b92bfa6011782\"\r\n        ],\r\n        \"Parent\": \"\",\r\n        \"Comment\": \"\",\r\n        \"Created\": \"2018-12-13T15:50:51.999385389Z\",\r\n        \"Container\": \"1f0c5e326ebef29ce1a1b236fb0f6572052a4e29e512a2dcd61100828e93c128\",\r\n        \"ContainerConfig\": {\r\n            \"Hostname\": \"1f0c5e326ebe\",\r\n            \"Domainname\": \"\",\r\n            \"User\": \"pack\",\r\n            \"AttachStdin\": false,\r\n            \"AttachStdout\": false,\r\n            \"AttachStderr\": false,\r\n            \"Tty\": false,\r\n            \"OpenStdin\": false,\r\n            \"StdinOnce\": false,\r\n            \"Env\": [\r\n                \"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\",\r\n                \"PACK_USER_ID=1000\",\r\n                \"PACK_GROUP_ID=1000\",\r\n                \"PACK_USER_GID=1000\",\r\n                \"PACK_STACK_ID=io.buildpacks.stacks.bionic\"\r\n            ],\r\n            \"Cmd\": [\r\n                \"/bin/sh\",\r\n                \"-c\",\r\n                \"#(nop) \",\r\n                \"USER [pack]\"\r\n            ],\r\n            \"ArgsEscaped\": true,\r\n            \"Image\": \"sha256:c79420299abfad11efb40605cb5d697938d4211fa96bf5eeb6c25c42e8ea0319\",\r\n            \"Volumes\": null,\r\n            \"WorkingDir\": \"/workspace\",\r\n            \"Entrypoint\": null,\r\n            \"OnBuild\": [],\r\n            \"Labels\": {\r\n                \"io.buildpacks.stack.id\": \"io.buildpacks.stacks.bionic\"\r\n            }\r\n        },\r\n        \"DockerVersion\": \"17.09.0-ce\",\r\n        \"Author\": \"\",\r\n        \"Config\": {\r\n            \"Hostname\": \"\",\r\n            \"Domainname\": \"\",\r\n            \"User\": \"pack\",\r\n            \"AttachStdin\": false,\r\n            \"AttachStdout\": false,\r\n            \"AttachStderr\": false,\r\n            \"Tty\": false,\r\n            \"OpenStdin\": false,\r\n            \"StdinOnce\": false,\r\n            \"Env\": [\r\n                \"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\",\r\n                \"PACK_USER_ID=1000\",\r\n                \"PACK_GROUP_ID=1000\",\r\n                \"PACK_USER_GID=1000\",\r\n                \"PACK_STACK_ID=io.buildpacks.stacks.bionic\"\r\n            ],\r\n            \"Cmd\": [\r\n                \"/bin/bash\"\r\n            ],\r\n            \"ArgsEscaped\": true,\r\n            \"Image\": \"sha256:c79420299abfad11efb40605cb5d697938d4211fa96bf5eeb6c25c42e8ea0319\",\r\n            \"Volumes\": null,\r\n            \"WorkingDir\": \"/workspace\",\r\n            \"Entrypoint\": null,\r\n            \"OnBuild\": [],\r\n            \"Labels\": {\r\n                \"io.buildpacks.stack.id\": \"io.buildpacks.stacks.bionic\"\r\n            }\r\n        },\r\n        \"Architecture\": \"amd64\",\r\n        \"Os\": \"linux\",\r\n        \"Size\": 160785932,\r\n        \"VirtualSize\": 160785932,\r\n        \"GraphDriver\": {\r\n            \"Data\": null,\r\n            \"Name\": \"btrfs\"\r\n        },\r\n        \"RootFS\": {\r\n            \"Type\": \"layers\",\r\n            \"Layers\": [\r\n                \"sha256:bc7f4b25d0ae3524466891c41cefc7c6833c533e00ba80f8063c68da9a8b65fe\",\r\n                \"sha256:a768c3f3878e96565d2bf0dcf90508261862847b2e7b8fc804a0770c07f0d5d5\",\r\n                \"sha256:ca2991e4676cba899ad9bc6ad3a044cd0816915f9e97a6f2e67b6accbc779ba5\",\r\n                \"sha256:b9b7103af585bd8ae9130de947817be7ce76092aa19cf6d2f9d5290440c645eb\",\r\n                \"sha256:032d2baa3733900113ee1889ad7d25e4d3cc80460e053ad8380c5caa5d92fa0e\",\r\n                \"sha256:f00869e87c9a2df28d329c0e9d0d296f8559e8ed6ea181e5bfe78876622e7dd4\",\r\n                \"sha256:2eb96b98417bb7eddca34013b39c867675fbfb36f8407f8260d98a2bdb989c8b\",\r\n                \"sha256:1bc8a5050a31d260a95f8706cc00792d11ebf95a7bd8e73badc5634e40712470\",\r\n                \"sha256:dd7d920542d0cda9376f572185e9ef45672c055d8dddd0ec40fc5327f3ee06ec\",\r\n                \"sha256:497f189f20920adffa62c06aa064bac401d64dfe02d2078285516f8fc20e0455\",\r\n                \"sha256:370ad906524c8d20e65476481cd7ac0028e736afeb5150d88734d63b2716771d\",\r\n                \"sha256:21c75b8decc3d9ed3608eb651033fc32c0a23dc984bda26227d30b9810b8d5c4\",\r\n                \"sha256:aa1ccb11ba849f793d734d696f597fada191c321a9f2cbb37ec45a19d8dd7e9a\"\r\n            ]\r\n        },\r\n        \"Metadata\": {\r\n            \"LastTagTime\": \"0001-01-01T00:00:00Z\"\r\n        }\r\n    }\r\n]\r\n```\r\n\r\nDocker run of that app image results in:\r\n```\r\nroot@2b65ee23-4861-433c-775d-86648d1df5d9:/tmp/build/db8923fc/buildpack# docker run -it test2 bash\r\n2018/12/13 16:47:18 Error: failed to launch: modify env: add layer root: open /workspace/org.cloudfoundry.buildpacks.nodejs: permission denied\r\n```\r\n"}}
{"actor":{"display_login":"ekcasey"}}