relferreira / metabase-sparksql-databricks-driver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when trying to build docker

itay-sgh opened this issue · comments

I tried to build the docker image docker build -t metabase:metabase-head-databricks-1.3.0 . and it was failed. I'm trying to build it on Macos with M1 chip.

Attaching the error message below. Any suggestions how to run it on Macos?

223.4    [clojure.main main "main.java" 40]]}}
223.4 
223.4 Execution error (NullPointerException) at metabuild-common.input/read-line-with-prompt (input.clj:29).
223.4 null
223.4 
------
Dockerfile:38
--------------------
  37 |     FROM stg_base as stg_build
  38 | >>> RUN clojure \
  39 | >>>     -Sdeps "{:aliases {:sparksql-databricks {:extra-deps {com.metabase/sparksql-databricks {:local/root \"/build/driver\"}}}}}" \
  40 | >>>     -X:build:sparksql-databricks \
  41 | >>>     build-drivers.build-driver/build-driver! \
  42 | >>>     "{:driver :sparksql-databricks, :project-dir \"/build/driver\", :target-dir \"/build/driver/target\"}"
  43 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c clojure     -Sdeps \"{:aliases {:sparksql-databricks {:extra-deps {com.metabase/sparksql-databricks {:local/root \\\"/build/driver\\\"}}}}}\"     -X:build:sparksql-databricks     build-drivers.build-driver/build-driver!     \"{:driver :sparksql-databricks, :project-dir \\\"/build/driver\\\", :target-dir \\\"/build/driver/target\\\"}\"" did not complete successfully: exit code: 1```

Have you tried with last metabase version ? this command worked for me on M1 pro :
docker buildx build --build-arg METABASE_VERSION=v0.48.3 --platform "linux/arm64" -t metabase:metabase-head-databricks-1.3.0 .

commented

I don't thinmk building for arm will work, as it uses Metabase's own docker image, and to my knowledge, they do not have arm builds.

Are you trying to build for x86-64? if so, try:

 docker build --build-arg METABASE_VERSION=v0.48.4 --platform "linux/amd64"  -t metabase:0.48.3 .

And then run it in x86 emulation on your mac

For my part had issue to run it on M1 so had to build it directly for arm (and it works perfectly fine :) ) But both should work anyways