Skip to content

Instantly share code, notes, and snippets.

@nevins-b
Created July 7, 2016 14:51
Show Gist options
  • Save nevins-b/42ed801860d737f3a8626751bafa9a27 to your computer and use it in GitHub Desktop.
Save nevins-b/42ed801860d737f3a8626751bafa9a27 to your computer and use it in GitHub Desktop.
Salt-master
#
# Salt Stack Salt Master Container
#
FROM ubuntu:14.04
# Update System
RUN apt-get update \
&& apt-get upgrade -y -o DPkg::Options::=--force-confold \
&& apt-get install -y wget
# Get SlackStack Repo
RUN wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pu | apt-key add - \
&& echo "deb deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest trusty main" > /etc/apt/sources.list.d/saltstack.list
# Install Salt
RUN apt-get update \
&& apt-get install -y salt-master \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Volumes
VOLUME ['/etc/salt/pki', '/var/cache/salt', '/var/logs/salt', '/etc/salt/master.d', '/srv/salt']
# Add Run File
ADD run.sh /usr/local/bin/run.sh
RUN chmod +x /usr/local/bin/run.sh
# Ports
EXPOSE 4505 4506
# Run Command
CMD "/usr/local/bin/run.sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment