Created
July 17, 2014 13:21
-
-
Save hurrycane/3ac0e16a7f9ec4e59aa5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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