Skip to content

Instantly share code, notes, and snippets.

@jeffbrl
Created January 31, 2017 02:18
Show Gist options
  • Save jeffbrl/bd243c592ad88ea0cd0d48fef887593d to your computer and use it in GitHub Desktop.
Save jeffbrl/bd243c592ad88ea0cd0d48fef887593d to your computer and use it in GitHub Desktop.
Fat ansible container
I use this container as a tools container in rancherOS. It's useful to me
because I can have the container configure itself using ansible playbooks.
From phusion/baseimage:0.9.18
MAINTAINER Jeff Loughridge <[email protected]>
RUN apt-get update && apt-get -y install --no-install-recommends \
git \
nano \
openssh-server \
python-apt \
software-properties-common
RUN apt-add-repository -y ppa:ansible/ansible && \
apt-get update && apt-get install -y ansible
RUN echo "127.0.0.1" > /etc/ansible/hosts && \
echo 'root:changeME' | chpasswd && \
sed -i 's/^#PermitRootLogin yes/PermitRootLogin yes/' /etc/ssh/sshd_config
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment