RocketChat / Docker.Official.Image

Docker hub - community managed image
293 stars 218 forks source link

Provide official Docker images for AArch64 (ARM64) #150

Open iamdavidcz opened 3 years ago

MaxWaldorf commented 3 years ago

+1

realdeadbeef commented 2 years ago

agree

semihalf-mazur-hubert commented 2 years ago

Hi, I have managed to create a workaround to build Rocket.Chat docker image for arm64, event though the official released bundle is built only for x86 (as meteor does not currently support linux.arm64 builds)

Please see attached Dockerfile diff:

1,2c1
< FROM debian:buster-slim
< 
---
> FROM debian:bullseye
8c7,12
< RUN ARCH="x64" \
---
> RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
>   && case "${dpkgArch##*-}" in \
>   amd64) ARCH='x64';; \
>   arm64) ARCH='arm64';; \
>   *) echo "unsupported architecture"; exit 1 ;; \
>   esac \
54,55c58,64
< 
< RUN set -eux \
---
> RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
>   && case "${dpkgArch##*-}" in \
>   amd64) ARCH='x64';; \
>   arm64) ARCH='arm64';; \
>   *) echo "unsupported architecture"; exit 1 ;; \
>   esac \
>   && set -eux \
69c78,86
<   && npm install \
---
>   && npm install --arch=${ARCH} --force \
>   && cd npm/node_modules/sharp \
>   && npm set unsafe-perm true \
>   && npm install --arch=${ARCH} --force \
>   && cd /app/bundle/programs/server/npm/node_modules/bcrypt \
>   && npm install --arch=${ARCH} --force --build-from-source \
>   && cd /app/bundle/programs/server/npm/node_modules/meteor/accounts-password/node_modules/bcrypt \
>   && npm install --arch=${ARCH} --force --build-from-source \
>   && cd /app/bundle/programs/server \

This allows to build both on x86 and arm64. The bullseye image is used due to newer glibc version, which is required for npm.

What do you think about this solution? I'm aware that this is a workaround but for now I can't see any other (until the meteor starts supporting linux.arm64 builds)

semihalf-mazur-hubert commented 2 years ago

Is there any chance to add this kind of arm64 support in the official release?

sprklinginfo commented 2 years ago

OMG. I have been trying to use docker-compose to set up for a week now, keep getting the error "Error: couldn't connect to server mongo:27017, connection attempt failed: HostNotFound: Could not find address for mongo:27017: SocketException: Host not found (authoritative) " and both containers show the status of 'restarting' all the time. Thought there is something wrong with my docker-compose.yml file. But now I realized the failure is due to the Oracle Cloud VM I am using is actually an arm64 instance??!! 😭😭why the doc never mentions this detail??!!👿

+1 for official docker images for ARM64.

sprklinginfo commented 2 years ago

Hello @semihalf-mazur-hubert , Is it possible to pull your unofficial image for AArch64 (ARM64)? Thanks.

semihalf-mazur-hubert commented 2 years ago

Hi @sprklinginfo , Unfortunately I don't have any repository with ready arm64 image. You can always use buildx to build for arm64. Anyway I hope that the Rocket.Chat might officially support arm64 and official docker images will be published.

KhalidElGazzar commented 1 year ago

OMG. I have been trying to use docker-compose to set up for a week now, keep getting the error "Error: couldn't connect to server mongo:27017, connection attempt failed: HostNotFound: Could not find address for mongo:27017: SocketException: Host not found (authoritative) " and both containers show the status of 'restarting' all the time. Thought there is something wrong with my docker-compose.yml file. But now I realized the failure is due to the Oracle Cloud VM I am using is actually an arm64 instance??!! 😭😭why the doc never mentions this detail??!!👿

+1 for official docker images for ARM64.

Same here. Except that it took me about 4 hours of banging my head on the wall to figure out why the error does not resolve. I was using docker-compose. I was suspicious that it might be due to the ARM architecture of OCI till I found that i can't even pull the docker image from docker hub then I found this thread!

truppelito commented 8 months ago

+1 for this!