yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
8.99k stars 1.07k forks source link

[Platform] Docker aarch64 image #10909

Closed robd003 closed 10 months ago

robd003 commented 2 years ago

Description

It would be great to have a multiarch docker build so that x86_64 and aarch64 images are available.

This would let people use AWS Graviton2 instances to run yugabyte. It would also allow people to test on the new Apple M1 Mac's when using docker.

dmagda commented 2 years ago

Regarding the Apple M1 support. The macOS users can use the x86 image with Docker Desktop 4.3+. Docker Desktop for Apple silicon supports multi-platform images, which allows you to build and run images for both x86 and ARM architectures without having to set up a complex cross-compilation development environment. https://docs.docker.com/desktop/mac/apple-silicon/

So, until the aarch64 image for YugabyteDB becomes available, the users can take advantage of Docker Desktop 4.3+. However, one of the users reported that YugabyteDB processes freeze and become unresponsive from time to time when running the x86 image on Apple silicon. The root cause is unclear though.

robd003 commented 2 years ago

I've had the x86_64 yugabyte process lockup on my M1 Mac.

Getting an arm64 build out would be great! Graviton2 is a LOT cheaper than paying the Intel tax on AWS.

jannehietamaki commented 2 years ago

Under emulation YugabyteDB is not usable because it's extremely slow. At least file system events / inotify is not working under emulation which may or may not cause this.

jannehietamaki commented 2 years ago

Here is a Dockerfile for building both arm64 and amd64 images from binary release of YB.

FROM centos:centos8
RUN cd /etc/yum.repos.d/
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
RUN yum upgrade -y
RUN yum install procps-ng wget libatomic python39 -y
RUN alternatives --set python /usr/bin/python3
RUN arch=$(arch | sed s/aarch64/el8-aarch64/ | sed s/x86_64/linux-x86_64/) && wget "https://downloads.yugabyte.com/releases/2.13.0.0/yugabyte-2.13.0.0-b42-${arch}.tar.gz" -O /tmp/yugabyte.tar.gz
RUN tar xvfz /tmp/yugabyte.tar.gz
RUN ln -s /yugabyte-2.13.0.0 /yugabyte
CMD /yugabyte/bin/yugabyted start --daemon=false --ui=false

Could be improved, but this seems to be working fine for me on M1.

timopulkkinen commented 2 years ago

This seems to still be open.

Meanwhile, here's a link to a Dockerfile that builds YDB w/ pldebugger.git from source:

https://github.com/timopulkkinen/yugabytedb-docker/blob/main/Dockerfile

Uses CentOS 8 as base image, and compiles w/ clang11. Currently bound to git commit cd3c1a4, but that is easily changed in script if needed.

svarnau commented 2 years ago

DB build on arm64: #14896

urashidmalik commented 1 year ago

Even after https://github.com/yugabyte/yugabyte-db/issues/14896 Still don't see any ARM arch in Dockerhub. Do we have an ETA?

jharveysmith commented 10 months ago

Hello! We have started releasing dual-arch docker images with yugabytedb/yugabyte:2.20.0.2-b1. Thank you for your patience!