taiga-docker
taiga-docker copied to clipboard
Support ARM architecture in docker
Docker now supports ARM architecture. It would be great if the taiga docker images are available as multi architecture images, as described for example here: https://www.docker.com/blog/getting-started-with-docker-for-arm-on-linux/
I tried myself, but taiga-back seems to be a bit challenging. If you are interested here a starting point:
Use "arm32v7/python" instead of "python" in Dockerfile. Ensure you have quemu installed for ARM, verify with:
$ cat /proc/sys/fs/binfmt_misc/qemu-aarch64
Create a docker builder:
$ docker buildx create --name mybuilder
$ docker buildx use mybuilder
$ docker buildx inspect --bootstrap
Enable ARM execution
docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
Build docker image for example for arm32v7 (you can pass multiple platforms of course):
docker buildx build --platform linux/arm/v7 -t soerd222888/taiga-back . -f docker/Dockerfile
This however eventually will not work out of the box, I am not sure about the cause, maybe the arm32v7 base image for arm32v7/python:3.7-slim is slightly different in terms of packages. You have to work around errors like missing django module until you arrive at something like this:
import _ssl # if we can't import it, let the error propagate taiga-back_1 | ImportError: libssl.so.1.1: cannot open shared object file: No such file or directory
Which seems to happen eventually as a consequence of loading kombu.
If there is interest I guess I could contribute in one or the other way I guess.
I'm adding to this issue because I'm also affected by the lack of multiarch support in Taiga docker. In particular, I would like to see official arm64 support for Taiga docker images, because I would like to be able to run these images on my AWS Graviton based ECS cluster as well as my Mac with Apple Silicon.
It looks like @sjoerd222888 has a slightly different use case (armv7 -- maybe a Raspberry Pi or similar?) but adding multiarch support to the build process in general will probably solve this issue for everyone.
Of the four custom docker images being shipped by Taiga, only one of them probably needs changes in the Dockerfile. Here's what I have:
taiga-back https://gallery.ecr.aws/r2d7r3i9/taiga-back
- I made a proof of concept arm64 build at the link above.
- Base image is
python:3.7-slim
from https://hub.docker.com/_/python ... It supports multiarch out of the box. - I made a pull request which fixed the build process for me: https://github.com/taigaio/taiga-back/pull/1611
- The main change I made was to introduce the
libpq-dev
package so pip can build psychopg2 from source when needed. - As @sjoerd222888 pointed out, not all packages may be present in all variants of the image. (This could be reported as a defect upstream.) So I also needed to add the
gnupg
package to make the gosu signature verification check work.
taiga-front https://gallery.ecr.aws/r2d7r3i9/taiga-front
- I made a proof of concept arm64 build at the link above.
- Base image is
nginx:1.19-alpine
from https://hub.docker.com/_/nginx ... It supports multiarch out of the box.
taiga-events https://gallery.ecr.aws/r2d7r3i9/taiga-events
- I made a proof of concept arm64 build at the link above.
- Base image is
node:12-alpine
from https://hub.docker.com/_/node ... It supports multiarch out of the box.
taiga-protected https://gallery.ecr.aws/r2d7r3i9/taiga-protected
- I made a proof of concept arm64 build at the link above.
- Base image is
python:3.7-slim
from https://hub.docker.com/_/python ... It supports multiarch out of the box.
taiga-gateway https://gallery.ecr.aws/r2d7r3i9/taiga-gateway
- This is a required piece of a working
taiga-docker
, however it doesn't exist as a separate container today. - I made a pull request containerizing it: https://github.com/taigaio/taiga-docker/pull/79
- I made a proof of concept arm64 build at the link above.
In conclusion...
Adding multiarch support to the Taiga docker images might require small changes to the build infrastructure, and it will require small changes to the taiga-back
Dockerfile. However, all of the base images being used already support multiarch, so it would just be a matter of extending that to Taiga's docker images.
I'm going to be setting up my Taiga instance on arm64 in the next couple days, so I'll report back with any additional findings.
Edit: Added a section above for taiga-gateway
.
Edit: This solution is working for me now! See details below.
It took me a couple days to upgrade my scripting and everything. (I have a full time job, so I don't have a ton of extra time to work on this.) That said, I finally have my Taiga 6 environment running on my AWS ECS cluster using arm64 Graviton2 processors: https://taiga.mbe.tv/project/yerface/timeline
I haven't had a chance to roll my sleeves up and dig into Taiga 6 yet, but the database upgrade (from 5) was painless, and everything looks beautiful. Great job Taiga team!
@alexmarkley: Could you make your Dockerfile you used for building taiga-back on ARM64 available somehow? So far I could not make it work on arm32v7. And yes I try to get it working on Raspberry Pi. I have version 5 running on Raspberry already and would like to migrate to version 6.
@sjoerd222888 sure! Please take a look at my pull request which includes two file updates: https://github.com/taigaio/taiga-back/pull/1611
And feel free to take a look at my fork, which the pull request is based on: https://github.com/alexmarkley/taiga-back/tree/arm64
I am very curious to know if my fixes for arm64 will apply to Raspberry Pi as well.
@alexmarkley Thanks, I checked yes. For linux/arm/v7 this Dockerfile does not work unfortunately. But I can confirm it works for amd64.
@alexmarkley Thanks, I checked yes. For linux/arm/v7 this Dockerfile does not work unfortunately. But I can confirm it works for amd64.
@sjoerd222888 When you run a build, what error do you get? I would love to improve my pull request to fix it.
@sjoerd222888 and another clarifying question:
Did you try running a Docker build on the target armv7, or just using an emulator?
Any news on this?
Hi there!
Do you know that we created Taiga Community for questions like yours? Please, check there; maybe another user has already asked something similar. If not, create your own. There are people there willing to help, members of the Taiga team members and other users.
To simplify the process, we will systematically close all issues that are general support questions and redirect people to Taiga Community.