AlexR2D2 / metabase_duckdb_driver

Metabase DuckDB Driver shipped as 3rd party plugin
Apache License 2.0
70 stars 21 forks source link

Got an error while trying to build a docker image (bin/build: not found) #5

Closed pyoner closed 1 year ago

pyoner commented 1 year ago
➜  metabase_duckdb_driver git:(main) ./build_image.sh 
Cloning into 'docker/metabase/source'...
remote: Enumerating objects: 353471, done.
remote: Counting objects: 100% (2540/2540), done.
remote: Compressing objects: 100% (1348/1348), done.
remote: Total 353471 (delta 1364), reused 1997 (delta 963), pack-reused 350931
Receiving objects: 100% (353471/353471), 321.25 MiB | 2.57 MiB/s, done.
Resolving deltas: 100% (231675/231675), done.
Sending build context to Docker daemon  464.1MB
Step 1/12 : FROM metabase/ci:java-11-clj-1.11.0.1100.04-2022-build as builder
java-11-clj-1.11.0.1100.04-2022-build: Pulling from metabase/ci
e0b25ef51634: Pull complete 
d1bd2bc15eb1: Pull complete 
77d0de1fd7e0: Pull complete 
b638505435dc: Pull complete 
1d8dbe37838f: Pull complete 
Digest: sha256:8881f81f34088fc2b1c0f1ce1b0356af600086c6494ef8c883ba7a6c099a158f
Status: Downloaded newer image for metabase/ci:java-11-clj-1.11.0.1100.04-2022-build
 ---> 918a5d466f5c
Step 2/12 : ARG MB_EDITION=oss
 ---> Running in 828160f4606a
Removing intermediate container 828160f4606a
 ---> 851d9f1a0819
Step 3/12 : WORKDIR /home/circleci
 ---> Running in 48204a92d230
Removing intermediate container 48204a92d230
 ---> 1861b928c007
Step 4/12 : COPY --chown=circleci . .
 ---> 074f69699758
Step 5/12 : RUN INTERACTIVE=false CI=true MB_EDITION=$MB_EDITION bin/build
 ---> Running in ee62ff90b6af
/bin/sh: 1: bin/build: not found
The command '/bin/sh -c INTERACTIVE=false CI=true MB_EDITION=$MB_EDITION bin/build' returned a non-zero code: 127
Sending build context to Docker daemon  464.1MB
Step 1/3 : FROM ubuntu_metabase
pull access denied for ubuntu_metabase, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Here is the error:

/bin/sh: 1: bin/build: not found
The command '/bin/sh -c INTERACTIVE=false CI=true MB_EDITION=$MB_EDITION bin/build' returned a non-zero code: 127
AlexR2D2 commented 1 year ago

I updated the metabase_duckdb_driver, could you try again? You need to clone the metabase_duckdb_driver, cd into metabase_duckdb_driver folder and run build_docker_image.sh.

pyoner commented 1 year ago

Hi @AlexR2D2! Thank you for the update, but it doesn't work for me. I got another error:

➜  metabase_duckdb_driver git:(main) ./build_docker_image.sh
Cloning into 'docker/metabase/source/v1.44.6'...
remote: Enumerating objects: 7631, done.
remote: Counting objects: 100% (7631/7631), done.
remote: Compressing objects: 100% (6646/6646), done.
remote: Total 7631 (delta 465), reused 3784 (delta 320), pack-reused 0
Receiving objects: 100% (7631/7631), 53.05 MiB | 1.27 MiB/s, done.
Resolving deltas: 100% (465/465), done.
Note: switching to '5c6ae211191d06e92bf1435afc9bad5473d7840a'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /var/lib/snapd/void/Dockerfile: no such file or directory
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /var/lib/snapd/void/docker: no such file or directory
AlexR2D2 commented 1 year ago

Some strange error. Maybe this can helps

pyoner commented 1 year ago

This error https://github.com/AlexR2D2/metabase_duckdb_driver/issues/5#issuecomment-1325193856 appeared because I cloned the repository to the /tmp folder

But in my home directory the script started and now it in progress...

pyoner commented 1 year ago

Got an error

      Metabase v0.44.7-SNAPSHOT (5c6ae21 ?) 

      Copyright © 2022 Metabase, Inc. 

      Metabase Enterprise Edition extensions are PRESENT.

      Usage of Metabase Enterprise Edition features are subject to the Metabase Commercial License. See https://www.metabase.com/license/commercial/ for details.
          Finished compilation in 32.8 seconds.
        Copy resources
          Copy src
          Copy shared/src
          Copy resources
        Create uberjar
      Building uber jar: /home/circleci/target/uberjar/metabase.jar
          Created uberjar in 17.5 seconds.
        Update META-INF/MANIFEST.MF
        Built target/uberjar/metabase.jar in 54.3 seconds.
    Uberjar built successfully.
  All build steps finished.
Removing intermediate container a549b5e683f9
 ---> 37b1382a623c
Step 6/12 : FROM --platform=linux/amd64 eclipse-temurin:11-jre as runner
 ---> 896000291b27
Step 7/12 : ENV FC_LANG en-US LC_CTYPE en_US.UTF-8
 ---> Using cache
 ---> 7d4df1e93157
Step 8/12 : RUN apt-get update &&     apt-get install -y bash fonts-dejavu curl ca-certificates-java &&     apt-get upgrade -y &&     rm -rf /var/cache/apt-get/* &&     mkdir -p /app/certs &&     curl https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem -o /app/certs/rds-combined-ca-bundle.pem  &&     /opt/java/openjdk/bin/keytool -noprompt -import -trustcacerts -alias aws-rds -file /app/certs/rds-combined-ca-bundle.pem -keystore /etc/ssl/certs/java/cacerts -keypass changeit -storepass changeit &&     curl https://cacerts.digicert.com/DigiCertGlobalRootG2.crt.pem -o /app/certs/DigiCertGlobalRootG2.crt.pem  &&     /opt/java/openjdk/bin/keytool -noprompt -import -trustcacerts -alias azure-cert -file /app/certs/DigiCertGlobalRootG2.crt.pem -keystore /etc/ssl/certs/java/cacerts -keypass changeit -storepass changeit &&     mkdir -p /plugins && chmod a+rwx /plugins
 ---> Using cache
 ---> 27d78738719b
Step 9/12 : COPY --from=builder /home/circleci/target/uberjar/metabase.jar /app/
 ---> 03376aa6b35c
Step 10/12 : COPY bin/docker/run_metabase.sh /app/
 ---> e31e665e4c4b
Step 11/12 : EXPOSE 3000
 ---> Running in 0c5d3752f438
Removing intermediate container 0c5d3752f438
 ---> e70c9bc55b74
Step 12/12 : ENTRYPOINT ["/app/run_metabase.sh"]
 ---> Running in 2e7fe790162b
Removing intermediate container 2e7fe790162b
 ---> a6e1a318366b
Successfully built a6e1a318366b
Successfully tagged ubuntu_metabase:latest
Sending build context to Docker daemon  167.8MB
Step 1/3 : FROM ubuntu_metabase
 ---> a6e1a318366b
Step 2/3 : COPY target/duckdb.metabase-driver.jar /plugins/
COPY failed: file not found in build context or excluded by .dockerignore: stat target/duckdb.metabase-driver.jar: file does not exist
andyPandy1337 commented 1 year ago

@AlexR2D2 I keep getting an error when trying to build the docker image using the provided script (build_docker_image.sh).

The command '/bin/sh -c INTERACTIVE=false CI=true MB_EDITION=$MB_EDITION bin/build' returned a non-zero code: 255
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /Users/andreasgustafsson/repos/metabase_duckdb_driver/docker/metabase/source/v1.44.6/docker: no such file or directory

Any ideas what might be wrong?

zufanka commented 1 year ago

I have the same issue as @pyoner when running build_docker_image.sh

Step 2/3 : COPY target/duckdb.metabase-driver.jar /plugins/ COPY failed: file not found in build context or excluded by .dockerignore: stat target/duckdb.metabase-driver.jar: file does not exist

Is there a fix? Thank you!

AlexR2D2 commented 1 year ago

Hi, @pyoner @zufanka, could you update the repository and try again? I fixed the script a bit :)

apps $ git clone git@github.com:AlexR2D2/metabase_duckdb_driver.git
apps $ cd metabase_duckdb_driver
apps/metabase_duckdb_driver $ ./build_docker_image.sh

... wait for the image to build
AlexR2D2 commented 1 year ago

@andyPandy1337

Any ideas what might be wrong?

it seems the Metabase the repository has not been cloned.

Could you try to clone Metabase source of v1.44.6 version manually into metabase_duckdb_driver /docker/metabase/source/v1.44.6 folder and try to run script again?

pyoner commented 1 year ago

@AlexR2D2 Successfully built Thanks!