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?
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?
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.
@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?
@psinghz, im guessing you may have figured this out already, but for others, i will add this example Dockerfile for adding the athena plugin.
Dockerfile
FROM metabase/metabase:v0.37.3
# Add athena driver jar to plugins directory
RUN cd /plugins && wget https://github.com/dacort/metabase-athena-driver/releases/download/v1.1.0/athena.metabase-driver.jar