FROM debian:stretch ARG CONFIG_DIR=/etc/default/config-files/ RUN apt-get update &&\ apt-get install -y wget gnupg2 &&\ wget -O - https://repo.saltstack.com/py3/debian/9/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add - &&\ echo 'deb http://repo.saltstack.com/py3/debian/9/amd64/latest stretch main' > /etc/apt/sources.list.d/saltstack.list &&\ apt-get update &&\ apt-get install -y ssmtp salt-master &&\ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* COPY ./vars-vars /etc/vars-vars COPY ./vars-files /etc/vars-files COPY ./common.sh /common.sh COPY run.sh /run.sh RUN mkdir "${CONFIG_DIR}" COPY ./config "${CONFIG_DIR}" CMD ["/run.sh"]