Search code examples
dockerapache-supersetsupertest

adding driver to Superset docker image


I am running Superset on k8s, as a helm chart, according to the docs, to install a driver you need to do add it here:

bootstrapScript: |
#!/bin/bash
pip install x if [ ! -f ~/bootstrap ]; then echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap; fi

but the issue is i am running this helm chart in an offline environment due to nonfunctional requirements we have

I tried to customize the docker image by the following

FROM apache/superset:master
RUN pip install clickhouse-connect==0.5.23

however the driver isn't present even after doing so, it seems that my way of installing the driver isn't correct

my question is how can i customize the superset docker image to include the drivers? all the resources/stackoverflow answers i found uses 'Docker Compose' link


Solution

  • Maybe you need to do the switch to the root user before the install and then switch back to superset when finished as shown below:

        FROM apache/superset:master
        USER root
        RUN pip install clickhouse-connect==0.5.23
        USER superset
    

    Also, read more on the docker hub page https://hub.docker.com/r/apache/superset