mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-04 23:26:46 +00:00
8a05c8f8be
* feat(docker/docs): explain how building lemmy works Signed-off-by: Enzo NOCERA <enzo@nocera.eu> * feat: add arm build * review: rename script & fix typo * feat(ci): allow cross platform compilation * feat(ci): prettier * fix(docker): fix base image name * fix: add dockerfile in CI path Signed-off-by: Enzo Nocera <enzo@nocera.eu> * fix(docker): fix runner name * fix(docker): fix builder base image * fix(docker): fix builder base image platform * fix(docker): avoid using the wrapper adduser/addgroup * feat: avoid adding the whole docker directory in the build context --------- Signed-off-by: Enzo NOCERA <enzo@nocera.eu> Signed-off-by: Enzo Nocera <enzo@nocera.eu> Co-authored-by: Dessalines <dessalines@users.noreply.github.com> Co-authored-by: Nutomic <me@nutomic.com>
21 lines
745 B
Markdown
21 lines
745 B
Markdown
# Building Lemmy Images
|
|
|
|
Lemmy's images are meant to be **built** on `linux/amd64`,
|
|
but they can be **executed** on both `linux/amd64` and `linux/arm64`.
|
|
|
|
To do so we need to use a _cross toolchain_ whose goal is to build
|
|
**from** amd64 **to** arm64.
|
|
|
|
Namely, we need to link the _lemmy_server_ with `pq` and `openssl`
|
|
shared libraries and a few others, and they need to be in `arm64`,
|
|
indeed.
|
|
|
|
The toolchain we use to cross-compile is specifically tailored for
|
|
Lemmy's needs, see [the image repository][image-repo].
|
|
|
|
#### References
|
|
|
|
- [The Linux Documentation Project on Shared Libraries][tldp-lib]
|
|
|
|
[tldp-lib]: https://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
|
|
[image-repo]: https://github.com/raskyld/lemmy-cross-toolchains
|