FROM debian:bookworm-slim # Install Prosody and dependencies RUN apt-get update --fix-missing && \ apt-get install -y --no-install-recommends \ prosody \ lua-dbi-mysql \ lua-sec \ lua-unbound \ openssl \ netcat-traditional \ && rm -rf /var/lib/apt/lists/* # Create prosody user and set up directories RUN mkdir -p /var/lib/prosody /var/log/prosody /var/run/prosody /etc/prosody/certs && \ chown -R prosody:prosody /var/lib/prosody /var/log/prosody /var/run/prosody /etc/prosody # Copy entrypoint script COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh # Switch to prosody user USER prosody # Expose Prosody ports # 5222: Client to Server (C2S) # 5269: Server to Server (S2S) # 5280: HTTP # 5281: HTTPS EXPOSE 5222 5269 5280 5281 # Set entrypoint ENTRYPOINT ["/entrypoint.sh"] CMD ["prosody", "-F"]