ejabberd/Dockerfile

36 lines
852 B
Docker
Raw Permalink Normal View History

2024-07-23 22:24:16 +01:00
# Mirrored from upstream Dockerfile
ARG UID='9000'
ARG USER='ejabberd'
ARG HOME="opt/$USER"
ARG METHOD='direct'
ARG BUILD_DIR="/$USER"
ARG VERSION=
FROM ghcr.io/processone/ejabberd:${VERSION} as upstream
# The fact that we have to sleep here sucks but "ejabberdctl start" doesn't wait for the
# daemon to be ready...
RUN ejabberdctl start && \
sleep 5 && \
ejabberdctl modules_available && \
ejabberdctl module_install mod_s3_upload && \
ejabberdctl stop && \
rm -Rf /opt/ejabberd/database/* && \
rm -Rf /opt/ejabberd/logs/* && \
rm /opt/ejabberd/.erlang.cookie
HEALTHCHECK \
--interval=1m \
--timeout=5s \
--start-period=5s \
--retries=10 \
CMD ejabberdctl status
WORKDIR /$HOME
USER $USER
VOLUME ["/$HOME"]
EXPOSE 1883 4369-4399 5210 5222 5269 5280 5443
ENTRYPOINT ["/sbin/tini","--","ejabberdctl"]
CMD ["foreground"]