Best Method To Building Docker Image for Metabase


#1

Hey guys,

I have a custom Metabase version (with added Driver support for Athena) which runs fine locally using the generated JAR file but when I try to build a docker image using docker build and try running a container, it’s not able to recognize the added driver. What would be the best way to create a custom docker image of Metabase rather than using the official images that are already on the Metabase Docker hub?


#2

I have used this as basis: https://github.com/metabase/metabase/tree/v0.28.1/bin/docker


#3

I figured out that it was the Athena driver JAR file I required for it to work properly. Would the dockerFile within that directory serve as an area where I could copy it over?


#4

Yes, if an additional .jar is needed in your image you’ll probably add a COPY to it as per usual Docker best practices.

And then within the image of course the .jar has to be on the Java classpath, but I guess you already have that part figured out with what you already got running outside Docker.


#5

@jornh Update: I was able to modify the DockerFile to download the associated Athena .jar file into the /plugins directory from where metabase.jar is but it still results in an Unable to resolve driver for query issue. Are there any other tips to solve this issue?


#6

Sorry, it’s not easy (next to impossible) to help you with debugging this with the little additional information you have given …

Not meant as criticism , but inspiration: (I’m just as frustrated as you with this conversation)