Dockerfile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. FROM docker.io/library/debian:bookworm-slim
  2. ARG JITSI_RELEASE=stable
  3. ARG TARGETPLATFORM
  4. ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
  5. COPY rootfs /
  6. RUN <<-EOF
  7. set -xe
  8. case ${TARGETPLATFORM} in \
  9. "linux/amd64") TPL_ARCH=amd64 ;; \
  10. "linux/arm64") TPL_ARCH=arm64 ;; \
  11. esac
  12. case ${TARGETPLATFORM} in \
  13. "linux/amd64") S6_ARCH=amd64 ;; \
  14. "linux/arm64") S6_ARCH=aarch64 ;; \
  15. esac
  16. apt-dpkg-wrap apt-get update
  17. apt-dpkg-wrap apt-get install -y apt-transport-https apt-utils ca-certificates gnupg lsb-release wget
  18. wget -qO /usr/bin/tpl https://github.com/jitsi/tpl/releases/download/v1.0.4/tpl-linux-${TPL_ARCH}
  19. wget -qO /tmp/s6.tar.gz https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-${S6_ARCH}.tar.gz
  20. mkdir /tmp/s6
  21. tar xfz /tmp/s6.tar.gz -C /tmp/s6
  22. tar hxfz /tmp/s6.tar.gz -C /
  23. rm -f /usr/bin/execlineb
  24. cp /tmp/s6/bin/execlineb /usr/bin/
  25. rm -rf /tmp/s6*
  26. wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | gpg --dearmour > /etc/apt/trusted.gpg.d/jitsi.gpg
  27. echo "deb https://download.jitsi.org $JITSI_RELEASE/" > /etc/apt/sources.list.d/jitsi.list
  28. echo "deb http://ftp.debian.org/debian $(lsb_release -sc)-backports main" > /etc/apt/sources.list.d/backports.list
  29. apt-dpkg-wrap apt-get update
  30. apt-dpkg-wrap apt-get dist-upgrade -y
  31. [ "$JITSI_RELEASE" = "unstable" ] && apt-dpkg-wrap apt-get install -y jq procps curl vim iputils-ping net-tools || true
  32. apt-cleanup
  33. chmod +x /usr/bin/tpl
  34. EOF
  35. ENTRYPOINT [ "/init" ]