{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/source-to-image/issues/380","labels_url":"https://api.github.com/repos/openshift/source-to-image/issues/380/labels{/name}","comments_url":"https://api.github.com/repos/openshift/source-to-image/issues/380/comments","events_url":"https://api.github.com/repos/openshift/source-to-image/issues/380/events","html_url":"https://github.com/openshift/source-to-image/pull/380","id":124965891,"number":380,"title":"Support injecting files into a container that runs assemble script","user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.githubusercontent.com/u/44136?v=3","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":36,"created_at":"2016-01-05T13:25:31Z","updated_at":"2016-01-11T09:55:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openshift/source-to-image/pulls/380","html_url":"https://github.com/openshift/source-to-image/pull/380","diff_url":"https://github.com/openshift/source-to-image/pull/380.diff","patch_url":"https://github.com/openshift/source-to-image/pull/380.patch"},"body":"Trello: https://trello.com/c/m5bPxwh4/643-8-allow-to-consume-secrets-in-builds\r\n\r\nHow this works?\r\n\r\n```console\r\n$ echo supersecretstuff > /tmp/foo/secret\r\n$ s2i build -p never --loglevel=5 --inject /tmp/foo:/tmp/bar \\\r\n  file://${GOPATH}/src/github.com/openshift/sti-ruby/2.2/test/rack-test-app \\\r\n  centos/ruby-22-centos7 testapp\r\n```\r\n\r\nWhat will happen is that the content of `/tmp/foo` folder will get injected (copied) into the container where the `assemble` script runs into the `/tmp/bar` directory. Assemble script can then read the \"secret\" file from there. The `UploadToContainer` approach allows is to copy any file into any arbitrary location in the container, which is great, because you can replace any file in container (or write to any directory)...\r\n\r\nThe drawback of this solution is that the file that is copied is owned by `root` and thus we can't erase it entirely, but we can instead `truncate` it ;-) I think, personally, that it is enough (we can add shred if we want to be pedant)"},"comment":{"url":"https://api.github.com/repos/openshift/source-to-image/issues/comments/170493048","html_url":"https://github.com/openshift/source-to-image/pull/380#issuecomment-170493048","issue_url":"https://api.github.com/repos/openshift/source-to-image/issues/380","id":170493048,"user":{"login":"openshift-bot","id":1779249,"avatar_url":"https://avatars.githubusercontent.com/u/1779249?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift-bot","html_url":"https://github.com/openshift-bot","followers_url":"https://api.github.com/users/openshift-bot/followers","following_url":"https://api.github.com/users/openshift-bot/following{/other_user}","gists_url":"https://api.github.com/users/openshift-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift-bot/subscriptions","organizations_url":"https://api.github.com/users/openshift-bot/orgs","repos_url":"https://api.github.com/users/openshift-bot/repos","events_url":"https://api.github.com/users/openshift-bot/events{/privacy}","received_events_url":"https://api.github.com/users/openshift-bot/received_events","type":"User","site_admin":false},"created_at":"2016-01-11T09:55:23Z","updated_at":"2016-01-11T09:55:23Z","body":"Source To Image Merge Results: Evaluating for testing"}}