matrix-docker-ansible-deploy
matrix-docker-ansible-deploy copied to clipboard
ARM support for matrix-bridge-appservice-discord
Is your feature request related to a problem? Please describe.
Cannot use matrix-bridge-appservice-discord on ARM using this playbook.
Describe the solution you'd like
To be able to self build matrix-bridge-appservice-discord for ARM.
Describe alternatives you've considered Not using this playbook, and setting it up manually.
Additional context Always fails at this step:
fatal: FAILED! => changed=false
cmd: /usr/bin/env docker run --rm --name matrix-appservice-discord-link-gen --user=997:1002 --cap-drop=ALL --mount type=bind,src=/matrix/appservice-discord/config,dst=/cfg -w /cfg docker.io/halfshot/matrix-appservice-discord:v1.0.0 /bin/sh -c "node /build/tools/addbot.js > /cfg/invite_link"
delta: '0:00:00.518943'
end: '2022-06-22 01:25:55.608855'
msg: non-zero return code
rc: 1
start: '2022-06-22 01:25:55.089912'
stderr: |-
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /usr/local/bin/docker-entrypoint.sh: exec format error
stderr_lines: <omitted>
stdout: ''
stdout_lines: <omitted>
The matrix-bridge-appservice-discord role has no self-building support yet. Most of our other bridges already have such support, so adding it to this role shouldn't be too hard.
Not using this playbook, and setting it up manually.
You will probably have an easier time adding self-building support to this role than setting up the bridge manually. Here's an example of how to do it. Of course, this is some very old commit (October 2021), so you'd better look at the actual code as it exists in the repository now.
In order for building to work on ARM, I'd have to modify the Dockerfile a little bit. Their last release was well over a year ago, so I'm not confident that the next release will come out soon; would it be better for me to have Ansible apply a patch to the Dockerfile so it works, or would it be preferred for me to make a PR on their repo and wait for the next release? The former approach should allow previous versions to be built on ARM as well.
We can apply a patch until upstream gets fixed. In any case, submitting the patch upstream, so that we don't need to carry the patch around is preferrable.