2020-01-31 13:46:46 +00:00
|
|
|
FROM debian:buster-slim
|
|
|
|
|
2020-05-13 12:57:22 +00:00
|
|
|
ARG BUILD_SERIES=dev
|
2020-01-31 13:46:46 +00:00
|
|
|
ARG BUILD_ID=0
|
|
|
|
|
|
|
|
# Install dependencies
|
|
|
|
|
|
|
|
RUN install -d -m 755 /snikket;
|
|
|
|
|
|
|
|
ADD tools/smtp-url-to-msmtp.lua /usr/local/bin/smtp-url-to-msmtp
|
|
|
|
RUN chmod 550 /usr/local/bin/smtp-url-to-msmtp
|
|
|
|
|
|
|
|
ADD docker/entrypoint.sh /bin/entrypoint.sh
|
2020-03-05 17:08:13 +00:00
|
|
|
RUN chmod 770 /bin/entrypoint.sh
|
|
|
|
ENTRYPOINT ["/bin/entrypoint.sh"]
|
2020-01-31 13:46:46 +00:00
|
|
|
|
2021-02-23 14:18:03 +00:00
|
|
|
HEALTHCHECK CMD lua -l socket -e 'assert(socket.connect(os.getenv"SNIKKET_TWEAK_INTERNAL_HTTP_INTERFACE" or "127.0.0.1",os.getenv"SNIKKET_TWEAK_INTERNAL_HTTP_PORT" or "5280"))'
|
|
|
|
|
2020-01-31 13:46:46 +00:00
|
|
|
ADD ansible /opt/ansible
|
|
|
|
|
|
|
|
ADD snikket-modules /usr/local/lib/snikket-modules
|
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
2020-11-11 16:40:35 +00:00
|
|
|
software-properties-common ca-certificates \
|
2020-01-31 13:46:46 +00:00
|
|
|
gpg gpg-agent \
|
2021-07-30 14:04:44 +00:00
|
|
|
ansible python3-passlib \
|
2021-03-15 19:55:33 +00:00
|
|
|
libcap2-bin build-essential\
|
2020-11-11 16:40:35 +00:00
|
|
|
&& c_rehash \
|
2021-07-30 14:04:44 +00:00
|
|
|
&& ansible-playbook -c local -i localhost, --extra-vars "ansible_python_interpreter=/usr/bin/python3" /opt/ansible/snikket.yml \
|
2021-07-30 18:39:41 +00:00
|
|
|
&& apt-get remove --purge -y \
|
2020-01-31 13:46:46 +00:00
|
|
|
ansible \
|
|
|
|
software-properties-common \
|
|
|
|
gpg gpg-agent \
|
2021-07-30 14:04:44 +00:00
|
|
|
python3-passlib \
|
2021-03-15 19:55:33 +00:00
|
|
|
mercurial libcap2-bin build-essential \
|
2021-07-30 18:41:46 +00:00
|
|
|
python3 python3.7-minimal \
|
2020-01-31 13:46:46 +00:00
|
|
|
&& apt-get autoremove -y \
|
2021-07-30 14:37:54 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
2020-01-31 13:46:46 +00:00
|
|
|
&& rm -rf /var/cache/*
|
|
|
|
|
2021-05-31 11:23:52 +00:00
|
|
|
RUN echo "Snikket $BUILD_SERIES $BUILD_ID" > /usr/lib/prosody/prosody.version
|
2020-01-31 13:46:46 +00:00
|
|
|
|
|
|
|
VOLUME ["/snikket"]
|