bigquery-emulator icon indicating copy to clipboard operation
bigquery-emulator copied to clipboard

Add Support for ARM64 Architecture in Docker Image

Open stepanov1997 opened this issue 1 year ago • 4 comments

I would like to propose adding support for the ARM64 architecture to the Docker image of the BigQuery emulator. With the increasing popularity and usage of ARM64-based systems, especially with the advent of ARM-based processors in both servers and personal computing devices, it is crucial for the Docker image to be compatible with these architectures.

Adding ARM64 support to the Docker image will:

•	Enhance the emulator’s usability on a broader range of hardware.
•	Enable developers using ARM64-based systems to leverage the BigQuery emulator Docker image without the need for workarounds or additional virtualization.
•	Promote greater flexibility and inclusivity for developers working on various hardware configurations.

I believe this enhancement will greatly benefit the community and align with the ongoing industry trend towards ARM64 adoption. Thank you for considering this request.

stepanov1997 avatar Jul 02 '24 08:07 stepanov1997

Unsure if this will help, but you should be able to run the emulator on a ARM64 based ( I tested on a M2 mac ) by passing in the platform flag to the docker run command. docker run --platform linux/x86_64 -it ghcr.io/goccy/bigquery-emulator:latest --project=test-project

It's mentioned at the end of How to start the standalone server section just in case if you missed it.

Niraj-Fonseka avatar Jul 02 '24 12:07 Niraj-Fonseka

I managed to build an ARM64 image locally, it needed 3 changes:

  1. build go-zetasql as ARM64 (no changes needed)
  2. update debian:bullseye to debian:bookworm in the emulator stage in the Dockerfile (here)
  3. comment out this bit in the Makefile (here):
ifneq ($(UNAME_OS),Darwin)
	STATIC_LINK_FLAG := -linkmode external -extldflags "-static"
endif

daaain avatar Feb 10 '25 17:02 daaain