How to build and run docker image with bokeh server ?

How to build and run docker image with bokeh server?

Here are some Bokeh specific examples you could customise:

There are also build instructions there.

I have built Eclipse Che workspace with a stack based on this Dockerfile but it is still work in progress as I still need to solve the port-mapping issues:

FROM eclipse/stack-base:ubuntu

RUN sudo apt-get purge -y python.* && sudo apt-get update && sudo apt-get install -y --no-install-recommends \

autoconf \

automake \

bzip2 \

file \

g++ \

gcc \

imagemagick \

libbz2-dev \

libc6-dev \

libcurl4-openssl-dev libdb-dev libevent-dev libffi-dev libgdbm-dev libgeoip-dev libglib2.0-dev libjpeg-dev \

libkrb5-dev liblzma-dev libmagickcore-dev libmagickwand-dev libmysqlclient-dev libncurses-dev libpng-dev \

libpq-dev libreadline-dev libsqlite3-dev libssl-dev libtool libwebp-dev libxml2-dev libxslt-dev libyaml-dev make patch xz-utils zlib1g-dev


ENV GPG_KEY=97FC712E4C024BBEA48A61ED3A5CA953F73C700D



RUN set -ex && sudo curl -fSL “${PYTHON_VERSION%%[a-z]}/Python-PYTHON_VERSION.tar.xz" -o python.tar.xz && sudo curl -fSL "{PYTHON_VERSION%%[a-z]}/Python-PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc && export GNUPGHOME="(mktemp -d)” && gpg --keyserver hkp:// --recv-keys “$GPG_KEY” && gpg --batch --verify python.tar.xz.asc python.tar.xz && sudo rm -r "GNUPGHOME" python.tar.xz.asc && sudo mkdir -p /usr/src/python && sudo tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz && sudo rm python.tar.xz && cd /usr/src/python && sudo ./configure --enable-shared --enable-unicode=ucs4 && sudo make -j(nproc) && sudo make install && sudo ldconfig && sudo pip3 install --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION && sudo find /usr/local ( -type d -a -name test -o -name tests ) -o ( -type f -a -name ‘.pyc’ -o -name '.pyo’ ) -exec rm -rf ‘{}’ + && sudo rm -rf /usr/src/python

RUN cd /usr/local/bin && sudo ln -s easy_install-3.5 easy_install && sudo ln -s idle3 idle && sudo ln -s pydoc3 pydoc && sudo ln -s python3 python && sudo ln -s python-config3 python-config

RUN sudo -H pip install --upgrade pip && \

sudo -H  pip install --no-cache-dir virtualenv && \

sudo -H  pip install --upgrade setuptools && \

sudo -H  pip install 'python-language-server[all]'

RUN sudo -H pip install pandas && \

sudo -H  pip install bokeh && \

sudo -H  pip install tornado==4.5.3 && \

sudo -H  pip install Flask

RUN sudo apt-get -y install vim && \

sudo wget -O && \

sudo unzip && \

sudo mv chromedriver /usr/local/bin/chromedriver && \

sudo rm

RUN sudo apt-get -y install libxss1 libappindicator1 libindicator7 && \

sudo wget && \

sudo apt -y install ./google-chrome-stable_current_amd64.deb && \

sudo rm google-chrome-stable_current_amd64.deb

RUN sudo -H pip install selenium && \

sudo -H  pip install splinter && \

sudo -H  pip install pyquery



You can strip selenium and google-chrome stuff there if you don’t need it…

More Dockerfiles (Eclipse Che) that you could use as examples are here:

To build a docker image I had to install docker-machine and docker on my Mac (VirtualBox was already there).

When you start docker daemon on you host machine go to the directory with Dockerfile and run (simple version):

docker build -t <build_tag> <image_repository_name> .


Don’t forget the “.” (dot) at the end

Here you can read more about building docker images:


On Wednesday, February 13, 2019 at 4:02:51 PM UTC+1, Стас Бокун wrote:

How to build and run docker image with bokeh server?