Example of rbdock, https://github.com/tcnksm/rbdock
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 ubuntu | |
# Install basic packages | |
RUN apt-get update | |
RUN apt-get install -y build-essential wget curl git | |
RUN apt-get install -y zlib1g-dev libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt-dev | |
RUN apt-get install -y sqlite3 libsqlite3-dev | |
RUN apt-get clean | |
# Install rbenv and ruby-build | |
RUN git clone https://github.com/sstephenson/rbenv.git /root/.rbenv | |
RUN git clone https://github.com/sstephenson/ruby-build.git /root/.rbenv/plugins/ruby-build | |
RUN ./root/.rbenv/plugins/ruby-build/install.sh | |
ENV PATH /root/.rbenv/bin:$PATH | |
RUN echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh # or /etc/profile | |
RUN echo 'eval "$(rbenv init -)"' >> .bashrc | |
# Install multiple versions of ruby | |
ENV CONFIGURE_OPTS --disable-install-doc | |
RUN rbenv install 2.1.0 | |
# Install Bundler for each version of ruby | |
RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc | |
RUN bash -l -c 'rbenv global 2.1.0; gem update; gem install bundler' | |
# Add application | |
RUN mkdir /myapp | |
WORKDIR /myapp | |
ADD my_rails_app/Gemfile /myapp/Gemfile | |
RUN bash -l -c 'bundle install' | |
ADD my_rails_app /myapp | |
ENTRYPOINT ["bash", "-l", "-c"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment