anchor.diff:  ENV HOME /opt/ejabberd
   ENV EJABBERD_VERSION 14.07
   ENV DEBIAN_FRONTEND noninteractive
  +
  +# Add ejabberd user and group
  +RUN groupadd -r ejabberd \
  +    && useradd -r -m \
  +       -g ejabberd \
  +       -d /opt/ejabberd \
  +       -s /usr/sbin/nologin \
  +       ejabberd
   
   # Install erlang and requirements
   RUN apt-get update && apt-get -y install \
  
positive.code:         python-jinja2 \
      && rm -rf /var/lib/apt/lists/*
  
  # ejabberd
  RUN wget -q -O /tmp/ejabberd-installer.run "http://www.process-one.net/downloads/downloads-action.php?file=/ejabberd/$EJABBERD_VERSION/ejabberd-$EJABBERD_VERSION-linux-x86_64-installer.run" \
      && chmod +x /tmp/ejabberd-installer.run \
      && /tmp/ejabberd-installer.run \
              --mode unattended \
              --prefix /opt/ejabberd \
              --adminpw ejabberd \
      && rm -rf /tmp/*
  
  # config
  COPY ./ejabberd.yml.tpl /opt/ejabberd/conf/ejabberd.yml.tpl
  
negative.code: # allows setting things like XMPP domain at runtime
  COPY ./run /opt/ejabberd/bin/run
  
  VOLUME ["/opt/ejabberd/database", "/opt/ejabberd/ssl"]
  EXPOSE 5222 5269 5280
  
  