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
|
|
|
|
|
|
|
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 \
|
|
|
|
ansible python-passlib python3-passlib \
|
2020-05-12 14:05:42 +00:00
|
|
|
libcap2-bin \
|
2020-01-31 13:46:46 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
2020-11-11 16:40:35 +00:00
|
|
|
&& c_rehash \
|
2020-01-31 13:46:46 +00:00
|
|
|
&& ansible-playbook -c local -i localhost, --extra-vars "ansible_python_interpreter=/usr/bin/python2" /opt/ansible/snikket.yml \
|
|
|
|
&& apt-get remove -y \
|
|
|
|
ansible \
|
|
|
|
software-properties-common \
|
|
|
|
gpg gpg-agent \
|
|
|
|
python-passlib python3-passlib \
|
2020-05-12 14:05:42 +00:00
|
|
|
mercurial libcap2-bin \
|
2020-01-31 13:46:46 +00:00
|
|
|
&& apt-get autoremove -y \
|
|
|
|
&& rm -rf /var/cache/*
|
|
|
|
|
2020-02-01 05:30:17 +00:00
|
|
|
RUN echo "Snikket $BUILD_SERIES.$BUILD_ID" > /usr/lib/prosody/prosody.version
|
2020-01-31 13:46:46 +00:00
|
|
|
|
|
|
|
VOLUME ["/snikket"]
|