logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/

release_to_docker_en.md (1764B)


  1. # Running OTP releases via Docker (glibc shim)
  2. Pleroma OTP releases are built on specific distros. If your host OS is older than
  3. the build environment, you may hit runtime linker errors such as:
  4. ```
  5. /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found
  6. ```
  7. If you don't want to upgrade your host OS, you can run the existing OTP release
  8. from `/opt/pleroma` inside an Ubuntu 24.04 container while keeping your existing
  9. host config and data directories.
  10. This approach uses a small "shim" container image to provide a newer `glibc`.
  11. It is **not** the official Pleroma Docker image.
  12. ## Requirements
  13. - Docker Engine + the Docker Compose plugin on the host
  14. - Root access (or equivalent access to the Docker socket)
  15. - Existing OTP release in `/opt/pleroma`
  16. - Existing config in `/etc/pleroma` and data in `/var/lib/pleroma`
  17. ## Setup
  18. 1. Copy the provided templates:
  19. ```sh
  20. mkdir -p /etc/pleroma/container
  21. cp -a /opt/pleroma/installation/release-to-docker/* /etc/pleroma/container/
  22. ```
  23. 2. Build the shim image:
  24. ```sh
  25. cd /etc/pleroma/container
  26. docker compose build
  27. ```
  28. 3. Replace your systemd unit:
  29. ```sh
  30. cp /etc/pleroma/container/pleroma.service /etc/systemd/system/pleroma.service
  31. systemctl daemon-reload
  32. systemctl enable --now pleroma
  33. journalctl -u pleroma -f
  34. ```
  35. ## Running migrations / `pleroma_ctl`
  36. Migrations are run automatically by default when the container starts. You can
  37. disable this by setting `PLEROMA_RUN_MIGRATIONS=0` in
  38. `/etc/pleroma/container/docker-compose.yml`.
  39. To run admin commands inside the container:
  40. ```sh
  41. cd /etc/pleroma/container
  42. docker compose exec pleroma /opt/pleroma/bin/pleroma_ctl status
  43. docker compose run --rm --no-deps pleroma /opt/pleroma/bin/pleroma_ctl migrate
  44. ```