Skip to content

Instantly share code, notes, and snippets.

@rgarcia
Last active December 31, 2015 01:59
Show Gist options
  • Select an option

  • Save rgarcia/7917826 to your computer and use it in GitHub Desktop.

Select an option

Save rgarcia/7917826 to your computer and use it in GitHub Desktop.
salt + docker
FROM salted
# /etc/hosts and /etc/hostname are read only. so change minion config
RUN HOSTNAME=`hostname` && sed "s/#id:/id: container-{{ name }}-$HOSTNAME/" -i /etc/salt/minion
ADD {{ salt_dir }} /srv/salt
ADD {{ pillar_dir }} /srv/pillar
RUN rm -f /etc/salt/minion_id
RUN salt-call --local state.highstate
RUN rm -r /srv/salt /srv/pillar
# assume salt state sets up supervisor for things it wants to run
CMD /usr/local/bin/supervisord -c /etc/supervisor/supervisor.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment