# Docker ARM Builds

**URL:** https://discourse.orthanc-server.org/t/docker-arm-builds/2720
**Category:** Google Groups archive
**Created:** [November 29, 2021, 6:12am UTC](https://discourse.orthanc-server.org/t/docker-arm-builds/2720 "2021-11-29T06:12:43Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![James\_Manners](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/j/a9adbd/32.png) [@James\_Manners](https://discourse.orthanc-server.org/u/James_Manners)
#### Post date: [November 29, 2021, 6:12am UTC](https://discourse.orthanc-server.org/t/docker-arm-builds/2720/1 "2021-11-29T06:12:43Z")

</div>

Hi Team,

I was reviewing today if it is possible to create ARM builds for the Osimis Docker containers. The good news is that I can build an ARM64 container using the --platform linux/arm64 option.

However it looks like the Osimis Web Viewer & Stone Viewer are being built by Jenkins and downloaded into the container.

My questions are:

1. Is there interest in me submitting patches to allow building ARM versions of the Osimis Orthanc container?
2. If so, we would need to build the matching binaries for the Osimis Web Viewer & Stone viewer. Is it best to modify the Jenkins build to create both binaries or is it better to include the build in the ARM64 Dockerfile?  
Cheers,

James

---

<div class="post-metadata">

### Author: ![Alain\_Mazy1](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Alain\_Mazy1](https://discourse.orthanc-server.org/u/Alain_Mazy1)
#### Post date: [December 1, 2021, 7:59am UTC](https://discourse.orthanc-server.org/t/docker-arm-builds/2720/2 "2021-12-01T07:59:31Z")

</div>

Hi James,

1. Feel free to share the patches for ARM64 and I’ll try to integrate them. I’ve never built a Docker image for ARM 64 so I can not guarantee that we will publish them regularly but that would already be nice if people are able to build them by themselves.
2. I think it’s better to include the build instructions in the Dockerfile themselves. Both viewers have quite complex build procedures, that’s the reason why I have never integrated their build in the Dockerfile.  
However, it makes perfect sense for the StoneViewer.  
The Osimis Viewer is even more complex to build and, since it is deprecated, I would just “forget” it for ARM64 arch.

Best regards,

Alain

---

<div class="post-metadata">

### Author: ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)
#### Post date: [December 1, 2021, 8:40am UTC](https://discourse.orthanc-server.org/t/docker-arm-builds/2720/3 "2021-12-01T08:40:45Z")

</div>

Hello James,

As far as the “Stone Web viewer” is concerned, we have a BuildBot server (not Jenkins) that builds the static resources (WebAssembly + HTML + CSS). Those static resources are continuously published in the “wasm-binaries.zip” file at the following location:  
[https://lsb.orthanc-server.com/stone-webviewer/mainline/](https://lsb.orthanc-server.com/stone-webviewer/mainline/)

These static resources are platform-independant, because they are executed client-side by the Web browser. They are thus fully compatible with ARM.

The Orthanc plugin for the Stone Web viewer is then built from the following CMake project:  
[https://hg.orthanc-server.com/orthanc-stone/file/default/Applications/StoneWebViewer/Plugin](https://hg.orthanc-server.com/orthanc-stone/file/default/Applications/StoneWebViewer/Plugin)

The CMake option “ORTHANC\_STONE\_BINARIES” of this project allows to indicate where the “wasm-binaries.zip” has been uncompressed.

You could thus create an ARM image by downloading the “wasm-binaries.zip”, then building only the plugin from sources (which is a very small project).

HTH,  
Sébastien-

---

<div class="post-metadata">

### Author: ![James\_Manners](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/j/a9adbd/32.png) [@James\_Manners](https://discourse.orthanc-server.org/u/James_Manners)
#### Post date: [December 1, 2021, 9:07am UTC](https://discourse.orthanc-server.org/t/docker-arm-builds/2720/4 "2021-12-01T09:07:31Z")

</div>

Hi Alain,

With Docker, it is possible to build multi-architectures with the same build command. I can provide an example script that demonstrates this.

Thanks Sébastien, I can use that to update the Dockerfile to also build the Stone viewer.

It will take me a while but I’ll get back when I’ve got something to contribute.

Cheers,

James

---

<div class="post-metadata">

### Author: ![James\_Manners](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/j/a9adbd/32.png) [@James\_Manners](https://discourse.orthanc-server.org/u/James_Manners)
#### Post date: [December 3, 2021, 1:18am UTC](https://discourse.orthanc-server.org/t/docker-arm-builds/2720/5 "2021-12-03T01:18:08Z")

</div>

Hi Alain,

Please find attached a patch for the Orthanc Builder repo that updates docker/orthanc/Dockerfile to allow ARM builds as discussed. For non amd64 builds, I remove the OsimisWebViewer plugin. This patch also includes a minor refactor to allow configuration of the version numbers at the top of the Dockerfile. This is purely a suggestion, personal preference of mine.

I have also attached a script that can be used to build and publish multi-architecture containers in 1 go. I used this script to publish linux/amd64 & linux/arm64 builds of Orthanc to here [https://hub.docker.com/repository/docker/jamesmanners/orthanc](https://hub.docker.com/repository/docker/jamesmanners/orthanc). You can use this as a basis for publishing multi-architecture builds to Docker Hub if you wish.

I have been testing the ARM build on my development machine and it is working well. My plan is to start testing the ARM build in our staging environment as well.

Hope this helps.

Cheers,

James

[multi-platoform-build.sh](https://discourse.orthanc-server.org/uploads/short-url/ztNV8o0cX1ZED4EsQEuFiWSS4Q9.sh) (642 Bytes)

[patch.diff](https://discourse.orthanc-server.org/uploads/short-url/uVuf63Zvi84f5qOLoN81uh5Khcc.diff) (3.67 KB)

---

<div class="post-metadata">

### Author: ![Alain\_Mazy1](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Alain\_Mazy1](https://discourse.orthanc-server.org/u/Alain_Mazy1)
#### Post date: [December 6, 2021, 1:47pm UTC](https://discourse.orthanc-server.org/t/docker-arm-builds/2720/6 "2021-12-06T13:47:38Z")

</div>

Hi James,

Thanks, I’ve updated our Dockerfile.

I’ve tried building the ARM64 on our build slaves but could not make it through so I finally disabled it. Anyone should still be able to build locally anyway.

Best regards,

Alain.
