{"action":"created","issue":{"url":"https://api.github.com/repos/bpeng2000/SOS/issues/87","repository_url":"https://api.github.com/repos/bpeng2000/SOS","labels_url":"https://api.github.com/repos/bpeng2000/SOS/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/bpeng2000/SOS/issues/87/comments","events_url":"https://api.github.com/repos/bpeng2000/SOS/issues/87/events","html_url":"https://github.com/bpeng2000/SOS/issues/87","id":147466293,"number":87,"title":"Option to run sos script inside a docker image.","user":{"login":"bpeng2000","id":9889312,"avatar_url":"https://avatars.githubusercontent.com/u/9889312?v=3","gravatar_id":"","url":"https://api.github.com/users/bpeng2000","html_url":"https://github.com/bpeng2000","followers_url":"https://api.github.com/users/bpeng2000/followers","following_url":"https://api.github.com/users/bpeng2000/following{/other_user}","gists_url":"https://api.github.com/users/bpeng2000/gists{/gist_id}","starred_url":"https://api.github.com/users/bpeng2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpeng2000/subscriptions","organizations_url":"https://api.github.com/users/bpeng2000/orgs","repos_url":"https://api.github.com/users/bpeng2000/repos","events_url":"https://api.github.com/users/bpeng2000/events{/privacy}","received_events_url":"https://api.github.com/users/bpeng2000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-11T15:32:43Z","updated_at":"2016-04-12T18:56:16Z","closed_at":null,"body":"Right now our syntax is used to run individual steps in different docker image. We should also have an option, cannot be `-d` because it is used by dryrun mode, but can be `-i` (image) or `-w` (with), such that\r\n\r\n``` \r\nsos run script.sos -w docker_image\r\n```\r\n\r\nwould execute the script inside docker. The problem is that the docker container might not have sos installed but perhaps we can install sos on the fly.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bpeng2000/SOS/issues/comments/209052771","html_url":"https://github.com/bpeng2000/SOS/issues/87#issuecomment-209052771","issue_url":"https://api.github.com/repos/bpeng2000/SOS/issues/87","id":209052771,"user":{"login":"bpeng2000","id":9889312,"avatar_url":"https://avatars.githubusercontent.com/u/9889312?v=3","gravatar_id":"","url":"https://api.github.com/users/bpeng2000","html_url":"https://github.com/bpeng2000","followers_url":"https://api.github.com/users/bpeng2000/followers","following_url":"https://api.github.com/users/bpeng2000/following{/other_user}","gists_url":"https://api.github.com/users/bpeng2000/gists{/gist_id}","starred_url":"https://api.github.com/users/bpeng2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpeng2000/subscriptions","organizations_url":"https://api.github.com/users/bpeng2000/orgs","repos_url":"https://api.github.com/users/bpeng2000/repos","events_url":"https://api.github.com/users/bpeng2000/events{/privacy}","received_events_url":"https://api.github.com/users/bpeng2000/received_events","type":"User","site_admin":false},"created_at":"2016-04-12T18:56:16Z","updated_at":"2016-04-12T18:56:16Z","body":"I understand. We can also export sos scripts to python scripts, or wrap SoS into a single executable (using pyinstaller and the like) but because SoS script can in theory use any python module, we will have to provide a full python 3 installation if the container does not have it (and that can easily break existing container service).\r\n\r\nWe can also mount local python3 and sos to docker container but even the os module would break because of the OS difference between docker/linux and host machine (mac in my case).\r\n\r\nI think the safest solution is to assume a common docker image for all steps if a docker image is provided from command line, but then there is no way to provide step specific docker run options (e.g. volumes)...\r\n\r\n"}}