You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.3 KiB

FROM ubuntu:18.04
# Set the timezone to GMT so that we don't get prompted in apt later
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install salt-master and clean up in one RUN command
# This is done to keep the image small (as each RUN would create a new layer to the image)
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install curl && \
curl -fsSL -o /usr/share/keyrings/salt-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg] bionic main" | tee /etc/apt/sources.list.d/salt.list && \
apt-get -y update && \
apt-get -y install \
python3-psycopg2 \
salt-master && \
/bin/rm -rf /tmp/* && \
/bin/rm /var/log/alternatives.log && \
/bin/rm /var/log/apt/* && \
/bin/rm /var/log/dpkg.log && \
apt-get -y autoclean all
# Set the salt-master process to auto accept all keys from minions
# This is a large security risk in the wild, but not a problem in a dev environment
# Don't do this in production. Seriously...
RUN sed -i "s|#auto_accept: False|auto_accept: True|g" /etc/salt/master
ENTRYPOINT ["salt-master", "-l", "debug"]