Skip to content

Instantly share code, notes, and snippets.

@takumikinjo
Last active August 29, 2015 14:03
Show Gist options
  • Save takumikinjo/59e5bcb8b01155e397ee to your computer and use it in GitHub Desktop.
Save takumikinjo/59e5bcb8b01155e397ee to your computer and use it in GitHub Desktop.
Dockerfile using baseimage-docker for my trial.
FROM phusion/baseimage:0.9.11
ENV HOME /root
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
RUN echo /root > /etc/container_environment/HOME
Add id_rsa.pub /tmp/id_rsa.pub
RUN cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys && rm -f /tmp/id_rsa.pub
RUN apt-get update
RUN apt-get install -y autoconf bison build-essential curl git-core libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev libxml2-dev libxslt1-dev libyaml-dev sqlite3 zlib1g-dev
RUN git clone https://github.com/sstephenson/rbenv.git /root/.rbenv
RUN echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> /root/.bash_profile
RUN echo 'eval "$(rbenv init -)"' >> /root/.bash_profile
RUN git clone https://github.com/sstephenson/ruby-build.git /root/.rbenv/plugins/ruby-build
RUN bash -lc 'rbenv install 2.0.0-p481'
RUN bash -lc 'rbenv global 2.0.0-p481'
RUN bash -lc 'gem update --system'
RUN bash -lc 'gem pristine --all'
RUN bash -lc 'gem install rails --no-rdoc --no-ri'
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
CMD ["/sbin/my_init"]
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMLMNmVy1R7hnLCXTynE5J0iZlgFlb8W9iOZ1Evy73ZfKNQ2UCShHn72iUVDK+x7/wHykyYcO87z0J5ciauHMjZNOq6cJa8zzIfd8rgC5SBd+DotPNq1XpZLYQrsllOICSZmPDTRK4C7C2PQmHUXmq3OUVyF31tnvy9iowEGv6epnaJbobnskyNe2TWxD1KUqPgE6KAQPbYTeIE2DEIxy3GDKwN8PNtwkyzMmTg11vnJDftm/YH/7Xy8ZInxF443m4FX2jGSeh7CM9fi9wOLcFX4ZwUr2jWwb56GNXjN0MohbEyxJZsqO0VmWivwobX+RjzjuqvPu9QP75RUMqFfhR vagrant@vagrant-ubuntu-trusty-64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment