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

ARM docker Image #357

Open
vncloudsco opened this issue Jun 2, 2022 · 18 comments
Open

ARM docker Image #357

vncloudsco opened this issue Jun 2, 2022 · 18 comments

Comments

@vncloudsco
Copy link

Dear: all contributors

we know that your software already support ARM however i see its docker image is not updated. is there any guide to help me do it or can you update the docker hub image?

Ref: https://blog.zulip.com/2022/03/29/zulip-5-0-released/

@maltegrosse
Copy link

multi arch images would be great! its possible to setup easily with github actions

klardotsh added a commit to klardotsh/docker-zulip that referenced this issue Feb 23, 2023
Allow building amd64+arm64 multiarch images locally for those brave
enough to experiment with them.

Refs zulip#357.
klardotsh added a commit to klardotsh/docker-zulip that referenced this issue Feb 23, 2023
Allow building amd64+arm64 multiarch images locally for those brave
enough to experiment with them.

Refs zulip#357.
klardotsh added a commit to klardotsh/docker-zulip that referenced this issue Mar 24, 2023
In light of recent changes to Docker Hub, move our Docker images into
GHCR which integrates more tightly with GitHub flows we already use
throughout the Zulip org. Since it's near-trivial to do so at the same
time, add officiallly-supported ARM64 builds.

Resolves zulip#357.
klardotsh added a commit to klardotsh/docker-zulip that referenced this issue Mar 24, 2023
In light of recent changes to Docker Hub, move our Docker images into
GHCR which integrates more tightly with GitHub flows we already use
throughout the Zulip org. Since it's near-trivial to do so at the same
time, add officiallly-supported ARM64 builds.

Resolves zulip#357.
klardotsh added a commit to klardotsh/docker-zulip that referenced this issue Mar 24, 2023
In light of recent changes to Docker Hub, move our Docker images into
GHCR which integrates more tightly with GitHub flows we already use
throughout the Zulip org. Since it's near-trivial to do so at the same
time, add officiallly-supported ARM64 builds.

Resolves zulip#357.
klardotsh added a commit to klardotsh/docker-zulip that referenced this issue Mar 24, 2023
In light of recent changes to Docker Hub, move our Docker images into
GHCR which integrates more tightly with GitHub flows we already use
throughout the Zulip org. Since it's near-trivial to do so at the same
time, add officiallly-supported ARM64 builds.

Resolves zulip#357.
klardotsh added a commit that referenced this issue Mar 24, 2023
In light of recent changes to Docker Hub, move our Docker images into
GHCR which integrates more tightly with GitHub flows we already use
throughout the Zulip org. Since it's near-trivial to do so at the same
time, add officiallly-supported ARM64 builds.

Resolves #357.
klardotsh added a commit to klardotsh/docker-zulip that referenced this issue Mar 24, 2023
In light of recent changes to Docker Hub, move our Docker images into
GHCR which integrates more tightly with GitHub flows we already use
throughout the Zulip org. Since it's near-trivial to do so at the same
time, add officiallly-supported ARM64 builds.

Resolves zulip#357.
klardotsh added a commit to klardotsh/docker-zulip that referenced this issue Mar 24, 2023
In light of recent changes to Docker Hub, move our Docker images into
GHCR which integrates more tightly with GitHub flows we already use
throughout the Zulip org. Since it's near-trivial to do so at the same
time, add officiallly-supported ARM64 builds.

Resolves zulip#357.
klardotsh added a commit that referenced this issue Mar 28, 2023
In light of recent changes to Docker Hub, move our Docker images into
GHCR which integrates more tightly with GitHub flows we already use
throughout the Zulip org. Since it's near-trivial to do so at the same
time, add officiallly-supported ARM64 builds.

Resolves #357.
@leadvic
Copy link

leadvic commented Sep 19, 2023

it's been more than a year since this, just to know are there any update or hope for those with ARM?

Thank you before hand!

@klardotsh
Copy link
Member

klardotsh commented Sep 19, 2023

You'll want to ping the team about #397, the re-opened flavor of the PR linked to this issue above. I no longer work for Zulip and highly doubt I'll have the appropriate time to do much with that PR as an external contributor any time soon, but it appears there's not a whole lot of feedback on it to address before it'll be in a merge-ready state (to my eye, and with the understanding that my knowledge of the Zulip codebase context ends at the end of March when I changed dayjobs).

@dretsa
Copy link

dretsa commented Jun 22, 2024

Are there any updates on this? Would be great to be able to run on t4g instances on AWS!

@cb0s
Copy link

cb0s commented Oct 9, 2024

Any updates? :) Would be great to get this installed on an ARM VPS! 😄

@cb0s
Copy link

cb0s commented Oct 9, 2024

For anyone who cannot wait (like me), simply build the image yourself on the target machine. For this, navigate to the folder to which you cloned docker-zulip:

$ pwd
/home/dummy-user/docker-zulip
$ # this can take several minutes - in my case it was ~50 min on a relatively new server
$ # you can choose (almost) any tag you like after -t
$ docker buildx build -t zulip-arm:latest .

Now edit the docker-compose.yml with your favourite editor or vim:

$ vim docker-compose.yml

Change the image of zulip from zulip/docker-zulip:<version> to the tag you chose earlier (zulip-arm:latest in this case).

You can probably also do this in one step changing image to build in the docker compose file. You will find more information about this in the official docker documentation.

@klardotsh
Copy link
Member

You can also cross-build from either architecture to the other. This is what the build_and_push_image.sh from #397 does: builds ARM64 images from AMD64 hosts. That script was designed to be able to push to ~any registry for ~any architectures or tags by changing environment variables.

The branch is a year and a half old and at this point I don't know what kind of rebase pain someone would be in for to stack it onto current trunk, but I suspect at least that script could be cherry-picked and used by anyone interested, still.

@tito
Copy link

tito commented Feb 21, 2025

If we try to build an ARM image today, we got issue with keyid in pnpm.

Apply theses changes to the Dockerfile to go around it:

diff --git a/Dockerfile b/Dockerfile
index 7acf367..dfd6c43 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -35,6 +35,12 @@ RUN git clone "$ZULIP_GIT_URL" && \

 WORKDIR /home/zulip/zulip

+# Corepack PNPM signature verification error, just for 9.4.0
+RUN sed -i '/ln -sf /a npm install -g corepack@latest' scripts/lib/install-node && \
+    git config user.email "[email protected]" && \
+    git config user.name "docker" && \
+    git commit -am 'update corepack'
+
 ARG CUSTOM_CA_CERTIFICATES

 # Finally, we provision the development environment and build a release tarball

Note: it would be easier to up the node version + update sha256 key, but the fix it not yet released on the latest node LTS

@Pezhvak
Copy link

Pezhvak commented Mar 11, 2025

I've made a docker image for arm, if anyone is instrested:

https://hub.docker.com/r/immortalvision/zulip-arm

@LiquidatorIO
Copy link

@Pezhvak I tried to build Zulip myself in docker, but it gets error. You had the same issue?

liquidator@ShadowGalactic:/volume1/docker/zulip$ sudo docker-compose up
Password: 
[+] Building 18.5s (7/14)                                                                                                                                                                    
 => CACHED [zulip internal] load git source https://github.com/zulip/docker-zulip.git                                                                                                   2.3s
 => [zulip internal] load metadata for docker.io/library/ubuntu:24.04                                                                                                                   5.0s 
 => [zulip base 1/2] FROM docker.io/library/ubuntu:24.04@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782                                                        0.0s 
 => CACHED [zulip base 2/2] RUN { [ ! "$UBUNTU_MIRROR" ] || sed -i "s|http://\(\w*\.\)*archive\.ubuntu\.com/ubuntu/\? |$UBUNTU_MIRROR |" /etc/apt/sources.list; } &&     apt-get -q up  0.0s 
 => CACHED [zulip build 1/5] RUN echo 'zulip ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers                                                                                                0.0s
 => CACHED [zulip build 2/5] WORKDIR /home/zulip                                                                                                                                        0.0s
 => ERROR [zulip build 3/5] RUN git clone "https://github.com/zulip/docker-zulip.git" &&     cd zulip &&     git checkout -b current "10.1"                                             7.7s
------                                                                                                                                                                                       
 > [zulip build 3/5] RUN git clone "https://github.com/zulip/docker-zulip.git" &&     cd zulip &&     git checkout -b current "10.1":                                                        
4.980 Cloning into 'docker-zulip'...
6.589 /bin/sh: 1: cd: can't cd to zulip

@Pezhvak
Copy link

Pezhvak commented Apr 7, 2025

@Pezhvak I tried to build Zulip myself in docker, but it gets error. You had the same issue?

liquidator@ShadowGalactic:/volume1/docker/zulip$ sudo docker-compose up
Password: 
[+] Building 18.5s (7/14)                                                                                                                                                                    
 => CACHED [zulip internal] load git source https://github.com/zulip/docker-zulip.git                                                                                                   2.3s
 => [zulip internal] load metadata for docker.io/library/ubuntu:24.04                                                                                                                   5.0s 
 => [zulip base 1/2] FROM docker.io/library/ubuntu:24.04@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782                                                        0.0s 
 => CACHED [zulip base 2/2] RUN { [ ! "$UBUNTU_MIRROR" ] || sed -i "s|http://\(\w*\.\)*archive\.ubuntu\.com/ubuntu/\? |$UBUNTU_MIRROR |" /etc/apt/sources.list; } &&     apt-get -q up  0.0s 
 => CACHED [zulip build 1/5] RUN echo 'zulip ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers                                                                                                0.0s
 => CACHED [zulip build 2/5] WORKDIR /home/zulip                                                                                                                                        0.0s
 => ERROR [zulip build 3/5] RUN git clone "https://github.com/zulip/docker-zulip.git" &&     cd zulip &&     git checkout -b current "10.1"                                             7.7s
------                                                                                                                                                                                       
 > [zulip build 3/5] RUN git clone "https://github.com/zulip/docker-zulip.git" &&     cd zulip &&     git checkout -b current "10.1":                                                        
4.980 Cloning into 'docker-zulip'...
6.589 /bin/sh: 1: cd: can't cd to zulip

To build the image yourself you have to use docker build command not the docker compose:

docker build -t [tag name] .

@LiquidatorIO
Copy link

Yes, thanks. I found this out and trying
sudo docker build -t zulip-arm:latest .
or
sudo docker build -t zulip:latest .

Sadly, it freezes on

 Downloaded semgrep
 Downloaded django
      Built python-ldap==3.4.4
      Built psycopg2==2.9.10
      Built uwsgi==2.0.28
      Built line-profiler==4.2.0

@Pezhvak
Copy link

Pezhvak commented Apr 8, 2025

Yes, thanks. I found this out and trying sudo docker build -t zulip-arm:latest . or sudo docker build -t zulip:latest .

Sadly, it freezes on

 Downloaded semgrep
 Downloaded django
      Built python-ldap==3.4.4
      Built psycopg2==2.9.10
      Built uwsgi==2.0.28
      Built line-profiler==4.2.0

you probably need more resources to make the image, if i remember correctly i tried to compile zulip with 4gb node but it got stuck, then i scaled to 8gb node and it went through.

@LiquidatorIO
Copy link

That is terrible information :P
Is there a way to build newest arm image through docker hub?

@Pezhvak
Copy link

Pezhvak commented Apr 8, 2025

I just built the ARM image for version 10.1-0, since i use zulip for my company i will keep it up-to-date, you may want to use it here:

docker pull immortalvision/zulip-arm:10.1-0

but you you are concerned about security and want to build it yourself from source, you have to boot an 8gb instance somewhere on the cloud and run the command i gave you, then push it into dockerhub and use it. that's what i'm doing as well.

The best approach is to enable multi-arch in ci/cd so it gets bult for AMD and ARM at the same time, this will ensure people who are concerned about security issues with third-party builds.

@LiquidatorIO
Copy link

Thank you!
I used your image before. Installation worked and I got through the whole process.
Sadly, upgrading to a new image didn't solve my issue #493

@Pezhvak
Copy link

Pezhvak commented Apr 8, 2025

Thank you! I used your image before. Installation worked and I got through the whole process. Sadly, upgrading to a new image didn't solve my issue #493

it seems you are using docker compose to boot things up, is that right? if so please share your final yaml file here so people can help you if possible.

@LiquidatorIO
Copy link

Yes. I pasted docker-compose.yml there, upgraded with new image.

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

9 participants