{"action":"created","comment":{"url":"https://api.github.com/repos/jupyter/docker-stacks/pulls/comments/59334439","id":59334439,"diff_hunk":"@@ -95,5 +95,16 @@ COPY start-notebook.sh /usr/local/bin/\n COPY jupyter_notebook_config.py /home/$NB_USER/.jupyter/\n RUN chown -R $NB_USER:users /home/$NB_USER/.jupyter\n \n+# Fetch additional scripts that run Notebook server in single-user mode (for\n+# use with JupyterHub)\n+RUN wget \\\n+    -q https://raw.githubusercontent.com/jupyter/jupyterhub/master/scripts/jupyterhub-singleuser \\","path":"minimal-notebook/Dockerfile","position":7,"original_position":7,"commit_id":"7bde280d029d2f2ece3e7d5497962a336164503c","original_commit_id":"7bde280d029d2f2ece3e7d5497962a336164503c","user":{"login":"minrk","id":151929,"avatar_url":"https://avatars.githubusercontent.com/u/151929?v=3","gravatar_id":"","url":"https://api.github.com/users/minrk","html_url":"https://github.com/minrk","followers_url":"https://api.github.com/users/minrk/followers","following_url":"https://api.github.com/users/minrk/following{/other_user}","gists_url":"https://api.github.com/users/minrk/gists{/gist_id}","starred_url":"https://api.github.com/users/minrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minrk/subscriptions","organizations_url":"https://api.github.com/users/minrk/orgs","repos_url":"https://api.github.com/users/minrk/repos","events_url":"https://api.github.com/users/minrk/events{/privacy}","received_events_url":"https://api.github.com/users/minrk/received_events","type":"User","site_admin":false},"body":"This is the only piece that makes me less confident about this PR being the way to go. JupyterHub isn't sensitive to the versions of anything in these images other than the version of JupyterHub whence came this singleuser script, which really should match the parent JupyterHub.\r\n\r\nPinning to stable (0.5.0) makes sense, though.","created_at":"2016-04-12T07:55:19Z","updated_at":"2016-04-12T07:55:20Z","html_url":"https://github.com/jupyter/docker-stacks/pull/185#discussion_r59334439","pull_request_url":"https://api.github.com/repos/jupyter/docker-stacks/pulls/185","_links":{"self":{"href":"https://api.github.com/repos/jupyter/docker-stacks/pulls/comments/59334439"},"html":{"href":"https://github.com/jupyter/docker-stacks/pull/185#discussion_r59334439"},"pull_request":{"href":"https://api.github.com/repos/jupyter/docker-stacks/pulls/185"}}},"pull_request":{"url":"https://api.github.com/repos/jupyter/docker-stacks/pulls/185","id":66086103,"html_url":"https://github.com/jupyter/docker-stacks/pull/185","diff_url":"https://github.com/jupyter/docker-stacks/pull/185.diff","patch_url":"https://github.com/jupyter/docker-stacks/pull/185.patch","issue_url":"https://api.github.com/repos/jupyter/docker-stacks/issues/185","number":185,"state":"open","locked":false,"title":"Add single-user scripts to minimal-notebook.","user":{"login":"jtyberg","id":359081,"avatar_url":"https://avatars.githubusercontent.com/u/359081?v=3","gravatar_id":"","url":"https://api.github.com/users/jtyberg","html_url":"https://github.com/jtyberg","followers_url":"https://api.github.com/users/jtyberg/followers","following_url":"https://api.github.com/users/jtyberg/following{/other_user}","gists_url":"https://api.github.com/users/jtyberg/gists{/gist_id}","starred_url":"https://api.github.com/users/jtyberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtyberg/subscriptions","organizations_url":"https://api.github.com/users/jtyberg/orgs","repos_url":"https://api.github.com/users/jtyberg/repos","events_url":"https://api.github.com/users/jtyberg/events{/privacy}","received_events_url":"https://api.github.com/users/jtyberg/received_events","type":"User","site_admin":false},"body":"Here is what I think is a light-touch approach to enabling the `*-notebook` stacks to run the notebook servers in different modes.\r\n\r\n1. Include the single-user scripts in the base `minimal-notebook` image to make them available to all notebook stacks.\r\n2. Run the notebook server in single-user mode by overriding the Docker run CMD.  For example, when spawning from JupyterHub, configure the DockerSpawner as follows:\r\n\r\n```\r\n# Spawn user containers from this image\r\nc.DockerSpawner.container_image = 'jupyter/all-spark-notebook'\r\n\r\n# Have the Spawner override the Docker run command\r\nc.DockerSpawner.extra_create_kwargs.update({ \r\n\t'command': '/usr/local/bin/singleuser.sh'\r\n})\r\n```\r\n\r\nAs a consumer of these images, I prefer this as opposed to dealing with a multiple images per stack, but that's just _my_ opinion.","created_at":"2016-04-12T00:58:34Z","updated_at":"2016-04-12T07:55:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"814f69c5dcad65e6f1986a16a8b9eab42e1b2cfc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jupyter/docker-stacks/pulls/185/commits","review_comments_url":"https://api.github.com/repos/jupyter/docker-stacks/pulls/185/comments","review_comment_url":"https://api.github.com/repos/jupyter/docker-stacks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jupyter/docker-stacks/issues/185/comments","statuses_url":"https://api.github.com/repos/jupyter/docker-stacks/statuses/7bde280d029d2f2ece3e7d5497962a336164503c","head":{"label":"jtyberg:single-user","ref":"single-user","sha":"7bde280d029d2f2ece3e7d5497962a336164503c","user":{"login":"jtyberg","id":359081,"avatar_url":"https://avatars.githubusercontent.com/u/359081?v=3","gravatar_id":"","url":"https://api.github.com/users/jtyberg","html_url":"https://github.com/jtyberg","followers_url":"https://api.github.com/users/jtyberg/followers","following_url":"https://api.github.com/users/jtyberg/following{/other_user}","gists_url":"https://api.github.com/users/jtyberg/gists{/gist_id}","starred_url":"https://api.github.com/users/jtyberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtyberg/subscriptions","organizations_url":"https://api.github.com/users/jtyberg/orgs","repos_url":"https://api.github.com/users/jtyberg/repos","events_url":"https://api.github.com/users/jtyberg/events{/privacy}","received_events_url":"https://api.github.com/users/jtyberg/received_events","type":"User","site_admin":false},"repo":{"id":42486938,"name":"docker-stacks","full_name":"jtyberg/docker-stacks","owner":{"login":"jtyberg","id":359081,"avatar_url":"https://avatars.githubusercontent.com/u/359081?v=3","gravatar_id":"","url":"https://api.github.com/users/jtyberg","html_url":"https://github.com/jtyberg","followers_url":"https://api.github.com/users/jtyberg/followers","following_url":"https://api.github.com/users/jtyberg/following{/other_user}","gists_url":"https://api.github.com/users/jtyberg/gists{/gist_id}","starred_url":"https://api.github.com/users/jtyberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtyberg/subscriptions","organizations_url":"https://api.github.com/users/jtyberg/orgs","repos_url":"https://api.github.com/users/jtyberg/repos","events_url":"https://api.github.com/users/jtyberg/events{/privacy}","received_events_url":"https://api.github.com/users/jtyberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jtyberg/docker-stacks","description":"Stacks of Jupyter applications+kernels, in docker","fork":true,"url":"https://api.github.com/repos/jtyberg/docker-stacks","forks_url":"https://api.github.com/repos/jtyberg/docker-stacks/forks","keys_url":"https://api.github.com/repos/jtyberg/docker-stacks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jtyberg/docker-stacks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jtyberg/docker-stacks/teams","hooks_url":"https://api.github.com/repos/jtyberg/docker-stacks/hooks","issue_events_url":"https://api.github.com/repos/jtyberg/docker-stacks/issues/events{/number}","events_url":"https://api.github.com/repos/jtyberg/docker-stacks/events","assignees_url":"https://api.github.com/repos/jtyberg/docker-stacks/assignees{/user}","branches_url":"https://api.github.com/repos/jtyberg/docker-stacks/branches{/branch}","tags_url":"https://api.github.com/repos/jtyberg/docker-stacks/tags","blobs_url":"https://api.github.com/repos/jtyberg/docker-stacks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jtyberg/docker-stacks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jtyberg/docker-stacks/git/refs{/sha}","trees_url":"https://api.github.com/repos/jtyberg/docker-stacks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jtyberg/docker-stacks/statuses/{sha}","languages_url":"https://api.github.com/repos/jtyberg/docker-stacks/languages","stargazers_url":"https://api.github.com/repos/jtyberg/docker-stacks/stargazers","contributors_url":"https://api.github.com/repos/jtyberg/docker-stacks/contributors","subscribers_url":"https://api.github.com/repos/jtyberg/docker-stacks/subscribers","subscription_url":"https://api.github.com/repos/jtyberg/docker-stacks/subscription","commits_url":"https://api.github.com/repos/jtyberg/docker-stacks/commits{/sha}","git_commits_url":"https://api.github.com/repos/jtyberg/docker-stacks/git/commits{/sha}","comments_url":"https://api.github.com/repos/jtyberg/docker-stacks/comments{/number}","issue_comment_url":"https://api.github.com/repos/jtyberg/docker-stacks/issues/comments{/number}","contents_url":"https://api.github.com/repos/jtyberg/docker-stacks/contents/{+path}","compare_url":"https://api.github.com/repos/jtyberg/docker-stacks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jtyberg/docker-stacks/merges","archive_url":"https://api.github.com/repos/jtyberg/docker-stacks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jtyberg/docker-stacks/downloads","issues_url":"https://api.github.com/repos/jtyberg/docker-stacks/issues{/number}","pulls_url":"https://api.github.com/repos/jtyberg/docker-stacks/pulls{/number}","milestones_url":"https://api.github.com/repos/jtyberg/docker-stacks/milestones{/number}","notifications_url":"https://api.github.com/repos/jtyberg/docker-stacks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jtyberg/docker-stacks/labels{/name}","releases_url":"https://api.github.com/repos/jtyberg/docker-stacks/releases{/id}","deployments_url":"https://api.github.com/repos/jtyberg/docker-stacks/deployments","created_at":"2015-09-15T01:21:41Z","updated_at":"2016-03-25T22:58:50Z","pushed_at":"2016-04-12T00:50:23Z","git_url":"git://github.com/jtyberg/docker-stacks.git","ssh_url":"git@github.com:jtyberg/docker-stacks.git","clone_url":"https://github.com/jtyberg/docker-stacks.git","svn_url":"https://github.com/jtyberg/docker-stacks","homepage":null,"size":297,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jupyter:master","ref":"master","sha":"0cb52a070a6bc29e40d63052e09f6f02dd33a5cc","user":{"login":"jupyter","id":7388996,"avatar_url":"https://avatars.githubusercontent.com/u/7388996?v=3","gravatar_id":"","url":"https://api.github.com/users/jupyter","html_url":"https://github.com/jupyter","followers_url":"https://api.github.com/users/jupyter/followers","following_url":"https://api.github.com/users/jupyter/following{/other_user}","gists_url":"https://api.github.com/users/jupyter/gists{/gist_id}","starred_url":"https://api.github.com/users/jupyter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupyter/subscriptions","organizations_url":"https://api.github.com/users/jupyter/orgs","repos_url":"https://api.github.com/users/jupyter/repos","events_url":"https://api.github.com/users/jupyter/events{/privacy}","received_events_url":"https://api.github.com/users/jupyter/received_events","type":"Organization","site_admin":false},"repo":{"id":39144867,"name":"docker-stacks","full_name":"jupyter/docker-stacks","owner":{"login":"jupyter","id":7388996,"avatar_url":"https://avatars.githubusercontent.com/u/7388996?v=3","gravatar_id":"","url":"https://api.github.com/users/jupyter","html_url":"https://github.com/jupyter","followers_url":"https://api.github.com/users/jupyter/followers","following_url":"https://api.github.com/users/jupyter/following{/other_user}","gists_url":"https://api.github.com/users/jupyter/gists{/gist_id}","starred_url":"https://api.github.com/users/jupyter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupyter/subscriptions","organizations_url":"https://api.github.com/users/jupyter/orgs","repos_url":"https://api.github.com/users/jupyter/repos","events_url":"https://api.github.com/users/jupyter/events{/privacy}","received_events_url":"https://api.github.com/users/jupyter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jupyter/docker-stacks","description":"Opinionated stacks of ready-to-run Jupyter applications in Docker.","fork":false,"url":"https://api.github.com/repos/jupyter/docker-stacks","forks_url":"https://api.github.com/repos/jupyter/docker-stacks/forks","keys_url":"https://api.github.com/repos/jupyter/docker-stacks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jupyter/docker-stacks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jupyter/docker-stacks/teams","hooks_url":"https://api.github.com/repos/jupyter/docker-stacks/hooks","issue_events_url":"https://api.github.com/repos/jupyter/docker-stacks/issues/events{/number}","events_url":"https://api.github.com/repos/jupyter/docker-stacks/events","assignees_url":"https://api.github.com/repos/jupyter/docker-stacks/assignees{/user}","branches_url":"https://api.github.com/repos/jupyter/docker-stacks/branches{/branch}","tags_url":"https://api.github.com/repos/jupyter/docker-stacks/tags","blobs_url":"https://api.github.com/repos/jupyter/docker-stacks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jupyter/docker-stacks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jupyter/docker-stacks/git/refs{/sha}","trees_url":"https://api.github.com/repos/jupyter/docker-stacks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jupyter/docker-stacks/statuses/{sha}","languages_url":"https://api.github.com/repos/jupyter/docker-stacks/languages","stargazers_url":"https://api.github.com/repos/jupyter/docker-stacks/stargazers","contributors_url":"https://api.github.com/repos/jupyter/docker-stacks/contributors","subscribers_url":"https://api.github.com/repos/jupyter/docker-stacks/subscribers","subscription_url":"https://api.github.com/repos/jupyter/docker-stacks/subscription","commits_url":"https://api.github.com/repos/jupyter/docker-stacks/commits{/sha}","git_commits_url":"https://api.github.com/repos/jupyter/docker-stacks/git/commits{/sha}","comments_url":"https://api.github.com/repos/jupyter/docker-stacks/comments{/number}","issue_comment_url":"https://api.github.com/repos/jupyter/docker-stacks/issues/comments{/number}","contents_url":"https://api.github.com/repos/jupyter/docker-stacks/contents/{+path}","compare_url":"https://api.github.com/repos/jupyter/docker-stacks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jupyter/docker-stacks/merges","archive_url":"https://api.github.com/repos/jupyter/docker-stacks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jupyter/docker-stacks/downloads","issues_url":"https://api.github.com/repos/jupyter/docker-stacks/issues{/number}","pulls_url":"https://api.github.com/repos/jupyter/docker-stacks/pulls{/number}","milestones_url":"https://api.github.com/repos/jupyter/docker-stacks/milestones{/number}","notifications_url":"https://api.github.com/repos/jupyter/docker-stacks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jupyter/docker-stacks/labels{/name}","releases_url":"https://api.github.com/repos/jupyter/docker-stacks/releases{/id}","deployments_url":"https://api.github.com/repos/jupyter/docker-stacks/deployments","created_at":"2015-07-15T15:30:00Z","updated_at":"2016-04-11T21:08:08Z","pushed_at":"2016-04-12T02:04:45Z","git_url":"git://github.com/jupyter/docker-stacks.git","ssh_url":"git@github.com:jupyter/docker-stacks.git","clone_url":"https://github.com/jupyter/docker-stacks.git","svn_url":"https://github.com/jupyter/docker-stacks","homepage":"","size":336,"stargazers_count":345,"watchers_count":345,"language":"Jupyter Notebook","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":137,"mirror_url":null,"open_issues_count":23,"forks":137,"open_issues":23,"watchers":345,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jupyter/docker-stacks/pulls/185"},"html":{"href":"https://github.com/jupyter/docker-stacks/pull/185"},"issue":{"href":"https://api.github.com/repos/jupyter/docker-stacks/issues/185"},"comments":{"href":"https://api.github.com/repos/jupyter/docker-stacks/issues/185/comments"},"review_comments":{"href":"https://api.github.com/repos/jupyter/docker-stacks/pulls/185/comments"},"review_comment":{"href":"https://api.github.com/repos/jupyter/docker-stacks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jupyter/docker-stacks/pulls/185/commits"},"statuses":{"href":"https://api.github.com/repos/jupyter/docker-stacks/statuses/7bde280d029d2f2ece3e7d5497962a336164503c"}}}}