Repository: bokeh/bokeh

Issue:
Feature idea: Docker image for bokeh server
For deployment, it'd be quite nice if I could just say:

`docker run bokeh/bokehserver`

and get the most recent bokeh server running that users can then connect to.



Discussion:
Currently there is work ongoing splitting the bokeh-server into a stand-alone package, and make a docker image for that is a really nice idea!

Any news on that ? Is there a beta to test ?
I'm in !
Thanks.

> Any news on that ? Is there a beta to test ?

Currently the bokeh-server is being rewritten, so I would not expect a docker image at least until that work is finished.

Ok. Thank you.

Any news on this?
I made this for own use: https://hub.docker.com/r/karelvandeplassche/bokeh/builds/. I'd be happy to donate this to the bokeh devs, or keep maintaining this repo.
I'm not actually a docker user, so I'm not really sure either of the requirements or the benefits are. The original query was from 2015, so it was in reference to the original (failed, 1st gen) `bokeh-server` which was  was mostly impossible to set up and use, especially due to the hard `redis` requirement. Nowadays, anyone can install bokeh with pip or conda and immediately `bokeh serve app.py` so I think the original motivation is largely reduced. So, I am going to go ahead and close this.

If anyone who *does* have strong ideas about what would be useful wants to put together either a PR, or a separate repo that we can move into the Bokeh GH org (if that's more appropriate), I'm happy to consider that when it shows up. 
One generally uses `docker` to have a fool-proof 'guaranteed working' environment, also for legacy versions of a code, and even when the underlying OS updates. Additionally (this is how I use it) one can run code in a VM-like isolated sandbox, while being lighter on the server than spinning up multiple VMs.

I'll probably keep using my solution, so I'm perfectly happy sharing it with you, albeit this task will be low on my priority list ;)
> or a separate repo that we can move into the Bokeh GH org (if that's more appropriate)

Can't we use:

> I made this for own use: https://hub.docker.com/r/karelvandeplassche/bokeh/builds/. I'd be happy to donate this to the bokeh devs, or keep maintaining this repo.

@adrianog For sure, but this is not something 'officially' by bokeh devs at the moment. If  there is enough demand for this feature, this issue should be re-opened and I can whip up a pull request to have this 'officially' supported.
@bryevdv I see there are still some files lying around in `docker-tools`. Are these still needed/supported?
@Karel-van-de-Plassche I don't use them, but those are docker containers for build/dev that a user contributed: https://github.com/bokeh/bokeh/pull/6375 I think they serve a different purpose than whats discussed here


As for docs I am happy to add a link to your builds or we could make a "bokeh" org on docker I guess? We just need to decide where to link things in the docs, I don't have strong opinions here. 

BTW @Karel-van-de-Plassche would you be interested in being added to @bokeh/dev ? 
@bryevdv Let's not link to my builds right now, I'm working on a brand new one in my bokeh fork. Being added to bokeh/dev would be great! Then I could even play with automated builds if you like.
Great! you should have an invitation, now when you make PRs you can (and should) make them directly on bokeh/bokeh (not from a fork) then the tests will fun faster and also save image diff results to report

Resolving patch:
diff --git a/docker-tools/hello_nodejs.py b/docker-tools/hello_nodejs.py
new file mode 100644
--- /dev/null
+++ b/docker-tools/hello_nodejs.py
@@ -0,0 +1,36 @@
+from bokeh.plotting import figure
+from bokeh.models import CustomJS, ColumnDataSource
+from bokeh.io import curdoc, show
+
+source = ColumnDataSource(data=dict(x=[.5], y=[.5]))
+
+p = figure(plot_width=400,
+           plot_height=400,
+           tools='tap',
+           title='Click Below',
+           x_range=(0.0, 1.0),
+           y_range=(0.0, 1.0)
+           )
+p.circle(x='x',
+         y='y',
+         size=20,
+         source=source
+         )
+
+callback = CustomJS.from_coffeescript(args=dict(source=source), code="""
+        # get data source from Callback args
+        data = source.data;
+        x = data['x']
+        y = data['y']
+
+        # update data source with new data
+        x.push(cb_obj.x)
+        y.push(cb_obj.y)
+
+        # emit update of data source
+        source.change.emit();
+""")
+p.js_on_event('tap', callback)
+
+show(p)
+curdoc().add_root(p)
diff --git a/docker-tools/hello_world.py b/docker-tools/hello_world.py
new file mode 100644
--- /dev/null
+++ b/docker-tools/hello_world.py
@@ -0,0 +1,7 @@
+from bokeh.io import curdoc, show
+from bokeh.plotting import figure
+
+p = figure(title='Hello world!')
+p.line([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], line_width=2)
+curdoc().add_root(p)
+show(p)


Test patch: