If you are new to Docker please check the official site on how to install it, for us installation is out of scope.
Getting the image and running a container
To create the image can just pull it from docker hub:
docker pull gianx/docker_jupyter_oracle
If everything is ok, you can see your image running
To run a new container:
docker run -d -p 8888:8888 -v "/localfolder:/notebooks" gianx/docker_jupyter_oracle:latest
This command will start a container as a demon (non-interactive), exposing port 8888 and mapping the working directory to “/localfolder”.
At this point, just poin a browser to:
… where “dockerip” is the IP of your host if you are running Ubuntu or the IP of your Docker machine if you are running OS X or Windows.
A look at the Dockerfile
You can find the Dockerfile here: http://bit.ly/1I3cMHB
It uses a base Jupyter image which installs both Python2 and Python3 and on top of that it installs Oracle client by downloading it:
RUN curl -O http://repo.dlt.psu.edu/RHEL5Workstation/x86_64/RPMS/oracle-instantclient12.1-basic-18.104.22.168.0-1.x86_64.rpm RUN curl -O http://repo.dlt.psu.edu/RHEL5Workstation/x86_64/RPMS/oracle-instantclient12.1-devel-22.214.171.124.0-1.x86_64.rpm
Then it installs Oracle client and both installs cx_Oracle for Python2 and Python3 by running:
RUN pip2 install requests cx_oracle RUN pip3 install requests cx_oracle
And as usal, that’s all!