datahub icon indicating copy to clipboard operation
datahub copied to clipboard

Git Clone -> Quickstart.sh fails on a Mac due to docker image compatibility with M1 hardware

Open PhillipTaylor opened this issue 6 months ago • 4 comments

Describe the bug

The quickstart guide lists three steps:

  1. git clone
  2. cd datahub
  3. ./docker/quickstart.sh

The last step fails on certain Apple machines.

HOST [20:53 PatchingPrototype$] git clone https://github.com/datahub-project/datahub.git

Cloning into 'datahub'...
remote: Enumerating objects: 599066, done.
remote: Counting objects: 100% (976/976), done.
remote: Compressing objects: 100% (250/250), done.
remote: Total 599066 (delta 870), reused 731 (delta 726), pack-reused 598090 (from 2)
Receiving objects: 100% (599066/599066), 582.15 MiB | 12.91 MiB/s, done.
Resolving deltas: 100% (355669/355669), done.
Updating files: 100% (15452/15452), done.
HOST [20:54 PatchingPrototype$] cd datahub
HOST [20:54 (master) datahub$] ./docker/quickstart.sh
Quickstarting DataHub: version head
Cannot connect to the Docker daemon at unix:///Users/pth758/.docker/run/docker.sock. Is the docker daemon running?
No Datahub Neo4j volume found, starting with elasticsearch as graph service
unable to get image 'acryldata/datahub-upgrade:head': Cannot connect to the Docker daemon at unix:///Users/pth758/.docker/run/docker.sock. Is the docker daemon running?
HOST [20:54 (master) datahub$] ./docker/quickstart.sh
Quickstarting DataHub: version head
No Datahub Neo4j volume found, starting with elasticsearch as graph service
[+] up 10/11
 ! Image confluentinc/cp-kafka:7.9.2                Interrupted                                                                            5.2s
 ! Image mariadb:10.5.8                             Interrupted                                                                            5.2s
 ! Image acryldata/datahub-frontend-react:head      Interrupted                                                                            5.2s
 ! Image acryldata/datahub-actions:head-slim        Interrupted                                                                            5.2s
 ! Image confluentinc/cp-zookeeper:7.9.2            Interrupted                                                                            5.2s
 ! Image elasticsearch:7.10.1                       Interrupted                                                                            5.2s
 ⠹ Image neo4j/neo4j-arm64-experimental:4.0.6-arm64 Pulling                                                                                5.2s
 ! Image acryldata/datahub-kafka-setup:head         Interrupted                                                                            5.2s
 ! Image acryldata/datahub-upgrade:head             Interrupted                                                                            5.2s
 ! Image acryldata/datahub-gms:head                 Interrupted                                                                            5.2s
 ✘ Image confluentinc/cp-schema-registry:7.9.2      Error no matching manifest for darwin/arm64 in the manifest list entries: no ...       5.2s
Error response from daemon: no matching manifest for darwin/arm64 in the manifest list entries: no match for platform in manifest: not found

To Reproduce Requires a Macbook to reproduce.

Expected behavior The app to start in docker and be available on port 9002

Screenshots N/A

Desktop (please complete the following information):

  • Mac M1
  • Tahoe 26.5

PhillipTaylor avatar May 21 '26 20:05 PhillipTaylor

Linear: PFP-3985

github-actions[bot] avatar May 21 '26 20:05 github-actions[bot]

We need to clean up that script. Suggest using ./gradlew quickstartDebug if you want to compile and run. Further info here: https://docs.datahub.com/docs/developers#deploying-the-full-stack

david-leifker avatar May 22 '26 00:05 david-leifker

I got AI to write a patch to get me around the issue. I doubt you want to merge as-is, but could be helpful for someone in the same situation:

diff --git a/docker/quickstart.sh b/docker/quickstart.sh
index 90c7d4ba9d..169c1a0b3d 100755
--- a/docker/quickstart.sh
+++ b/docker/quickstart.sh
@@ -24,9 +24,32 @@ TAG_VERSION=$(cd $DIR && git name-rev --name-only --tags HEAD)
 DEFAULT_VERSION=$(echo $TAG_VERSION | sed 's/undefined/head/')
 export DATAHUB_VERSION=${DATAHUB_VERSION:-${DEFAULT_VERSION}}
 
+# On Apple Silicon, swap the base no-neo4j compose file for the M1 variant
+# (which uses mariadb for mysql). Do NOT overlay docker-compose.m1.yml here
+# because it also declares a neo4j service that would get merged in and break
+# the no-neo4j path.
+NO_NEO4J_COMPOSE_FILE="quickstart/docker-compose-without-neo4j.quickstart.yml"
 M1_COMPOSE=""
 if [[ $(uname -m) == 'arm64' && $(uname) == 'Darwin' ]]; then
-  M1_COMPOSE="-f docker-compose.m1.yml"
+  NO_NEO4J_COMPOSE_FILE="quickstart/docker-compose-without-neo4j-m1.quickstart.yml"
+fi
+
+# Always pick a working linux/<arch> platform for DataHub's images. We do NOT
+# honour an inherited DOCKER_DEFAULT_PLATFORM here because a stale value from
+# the caller's shell would cause Docker to request a non-existent manifest
+# (e.g. amd64 of neo4j/neo4j-arm64-experimental, or arm64 of older images
+# that ship amd64-only) and fail before any container starts.
+#
+# On Apple Silicon we deliberately use linux/amd64 (run under Rosetta): some
+# of DataHub's pinned images (notably elasticsearch:7.10.1 as resolved from
+# the local image cache, and some Confluent images at older tags) do not have
+# usable arm64 variants in practice. This matches the long-standing supported
+# configuration -- the no-neo4j path no longer overlays an ARM-only neo4j
+# image, so a uniform linux/amd64 default is safe.
+if [[ $(uname -m) == 'arm64' && $(uname) == 'Darwin' ]]; then
+  export DOCKER_DEFAULT_PLATFORM="linux/amd64"
+else
+  export DOCKER_DEFAULT_PLATFORM="linux/$(uname -m)"
 fi
 
 echo "Quickstarting DataHub: version ${DATAHUB_VERSION}"
@@ -37,7 +60,7 @@ then
 else
   echo "No Datahub Neo4j volume found, starting with elasticsearch as graph service"
   cd $DIR && \
-  DOCKER_DEFAULT_PLATFORM="$(uname -m)" docker compose -p datahub \
-    -f quickstart/docker-compose-without-neo4j.quickstart.yml \
+  docker compose -p datahub \
+    -f "$NO_NEO4J_COMPOSE_FILE" \
     $MONITORING_COMPOSE $CONSUMERS_COMPOSE $M1_COMPOSE up $@
 fi

PhillipTaylor avatar May 22 '26 08:05 PhillipTaylor

This has been addressed - #17561 removed the legacy quickstart.sh, and #17637 follow-up PR fixes remaining stale docs references. For local development, use ./gradlew quickstartDebug. For standard quickstart: pip install acryl-datahub && datahub docker quickstart.

Updated docs: https://docs.datahub.com/docs/developers#deploying-the-full-stack

lakshay-nasa avatar May 29 '26 12:05 lakshay-nasa