Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide arm64 docker image for running on Apple M1/M2 #309

Open
zsvoboda opened this issue Aug 3, 2022 · 7 comments
Open

Provide arm64 docker image for running on Apple M1/M2 #309

zsvoboda opened this issue Aug 3, 2022 · 7 comments

Comments

@zsvoboda
Copy link

zsvoboda commented Aug 3, 2022

Please provide arm64 docker image for Apple M1/M2.

Thanks

ZD

@xin-hedera
Copy link

upvote this

@j-white
Copy link

j-white commented Jul 18, 2023

I've run into this as well while trying to use Citus locally for development.

It looks like the Docker files pull packages from the Debian repository which doesn't have any arm64 artifacts published: packagecloud. I guess we would need to start there, by publish arm64 .debs.

@j-white
Copy link

j-white commented Jul 20, 2023

I spent some time deciphering the builds and I managed to get an arm64 version of the image up here: https://hub.docker.com/layers/jwhiteatdocker/citus/12.0.0-pg14/images/sha256-caa0ba563dc700428d8c01bd4962cfb5feda61b7958a13a73d8542dba4a90fcd?context=repo

First, I fixed the build_packages command so I could rebuild existing x64 packages: j-white/citus-packaging@45d0a56

I got them to build on an M1 (arm64): j-white/citus-packaging@d3df965

I uploaded the packages to packagecloud: https://packagecloud.io/j-white/citusdata-community-arm64

And then I rebuilt the Docker images: j-white@b040f72

The result is a multi-arch container for Citus 12.0.0 and PG14:

% docker pull jwhiteatdocker/citus:12.0.0-pg14
...
% docker inspect jwhiteatdocker/citus:12.0.0-pg14 | jq -r '.[] | .Architecture'
arm64
% docker run -d --name "citusdev" -e "POSTGRES_HOST_AUTH_METHOD=trust" -p 5432:5432 jwhiteatdocker/citus:12.0.0-pg14 -c fsync=off
...
% docker exec -it citusdev psql -U postgres
psql (14.8 (Debian 14.8-1.pgdg120+1))
Type "help" for help.

postgres=# CREATE TABLE daily_page_views (
    tenant_id int,
    day date,
    page_id int,
    view_count bigint,
    primary key (tenant_id, day, page_id)
);

SELECT create_distributed_table('daily_page_views', 'tenant_id');
CREATE TABLE
 create_distributed_table 
--------------------------
 
(1 row)

postgres=# 

@9mm
Copy link

9mm commented Jan 15, 2024

+1

That's an awesome solution but ideally this is part of official image

@aorticweb
Copy link

+1 on this

@jremen
Copy link

jremen commented Jun 20, 2024

+1
Please add this to official repo

@xgerman
Copy link

xgerman commented Nov 1, 2024

+1 also for pg16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants