matrix-org / matrix-appservice-discord

A bridge between Matrix and Discord.
Apache License 2.0
790 stars 148 forks source link

Use debian slim for docker builds #828

Closed Half-Shot closed 1 year ago

Half-Shot commented 1 year ago

Fixes #827

Matrix-appservice-bridge 5.0.0 brought in new changes (matrix-bot-sdk) which relies on compiled crypto modules. These modules do not appear to work properly on alpine.

Error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /node_modules/@matrix-org/matrix-sdk-crypto-nodejs/matrix-sdk-crypto.linux-x64-musl.node)
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1189:18)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/index.js:159:31)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  code: 'ERR_DLOPEN_FAILED'
}

Prior experience has taught me that alpine and native rust modules tend not to blend too well, so I'm going to say we just use debian-slim for our images. We do this for the Slack/IRC/Hookshot bridges already.