Customize atoti Dockerfile for quick deployment
Docker is one of the leading open-source DevOps containerization tools. It enables us to package our applications and the dependencies into containers, making it easy to deploy and run the application. Here, we will see how to dockerize a BI project.
You should have Docker installed on your machine. Refer to the Docker get-started guide if you haven’t.
Steps to dockerize
The diagram below shows how to get an application dockerized. Refer to this Docker blog for more details.
Some high-level definitions:
- Dockerfile: Set of instructions to build the Docker image. This includes the dependencies installation, folders creations etc.
- Docker image: Set of processes as outlined in the Dockerfile to create the container.
- Docker containers: An instance of the Docker image with the application ready for use.
Instead of going through the full details of how to dockerize, we speed up the process of dockerizing an atoti Business Intelligence project with the ready-to-use atoti Docker image.
atoti Docker image
atoti distributes an official image on Docker Hub. The image comes with the atoti library and its JupyterLab extension ready to use.
You may use the Dockerfile as a base image to add new layers necessary for your application.
In this article, we will define a password instead of the token authentication that is defaulted in JupyterLab. We will modify the Dockerfile as highlighted below:
Note: You could also disable authentication altogether by setting the token and password to empty strings. This is however not recommended on its documentation.
You can rebuild the image with the command:
docker build -t atoti .
Running the Docker image
Before you run the command to run the Docker image, remember to create a volume to persist the data such as your notebooks and files:
docker volume create atoti-volume
Run the image using the create volume with the following command:
docker run — publish 8888:8888 — volume atoti-volume:/home/jovyan/work atoti/atoti
Access the BI dashboards
We can now run our atoti notebooks, build and access the dashboards that are saved previously.
Check out the atoti documentation to find out more about what you can do with it.