Skip to content

Instantly share code, notes, and snippets.

@hurrycane
Created July 17, 2014 13:21
Show Gist options
  • Save hurrycane/3ac0e16a7f9ec4e59aa5 to your computer and use it in GitHub Desktop.
Save hurrycane/3ac0e16a7f9ec4e59aa5 to your computer and use it in GitHub Desktop.
FROM phusion/baseimage:0.9.11
ENV HOME /root
# custom keys
ADD private.pub /tmp/service
RUN mkdir -p /root/.ssh
RUN chmod 700 /root/.ssh
RUN touch /root/.ssh/authorized_keys
RUN chmod 600 /root/.ssh/authorized_keys
RUN cat /tmp/service >> /root/.ssh/authorized_keys && rm -f /tmp/service
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment