MYL INSTITUTE

Your consulting partner for technology solutions, providing you with market research, industry insights for investment in Guyana where language isn't a barrier.

How to extend Apache Superset

Posted by:

|

On:

|

,

If you’re wondering how to extend an Apache Superset image, to get additional features this guide is for you.

To extend the image such as including additional database drivers create a docker file named Dockerfile. Enter the details of the packages to be installed.

  1. To begin from the working directory on your server. Using your editor of choice create a “Dockerfile” and include the following contents.
  2. Be sure to declare at the head of the file, the image to be installed from, for example “FROM apache/superset:2.1.0”.
  3. Switch to root user before installing using “USER root”.
  4. Install packages, for example “RUN pip install mysqlclient”.
  5. Switch back to superset user after installation using “USER superset”.
  6. Save and exit the editor.
  7. Build the new image using “docker build . -t <name>:<tag>”. For example, “docker build . -t myl/superset:2.1.0”.
  8. Deploy the new image using docker run or docker compose.

There are other ways to accomplish extending an image. Sometimes a bit of creativity is what’s needed. You can try editing a running container, which isn’t a recommended option because you can lose your changes when the container is stopped or risk breaking the file system. To edit a running container, enter the file system using the “docker exec” command. Follow MYL for more tips.