Skip to content

Instantly share code, notes, and snippets.

@tcnksm tcnksm/Dockerfile
Last active Aug 29, 2015

What would you like to do?
Example of rbdock
FROM tcnksm/rails_base
FROM ubuntu
# Install basic dev tools
RUN apt-get update && apt-get install -y \
build-essential \
wget \
curl \
# Install package for ruby
RUN apt-get install -y \
zlib1g-dev \
libssl-dev \
libreadline-dev \
libyaml-dev \
libxml2-dev \
# Install package for sqlite3
RUN apt-get install -y \
sqlite3 \
# Install package for postgresql
RUN apt-get install -y libpq-dev
# Install ruby-build
RUN git clone .ruby-build
RUN .ruby-build/
RUN rm -fr .ruby-build
# Install ruby-2.0.0-p247
RUN ruby-build 2.0.0-p247 /usr/local
# Install bundler
RUN gem update --system
RUN gem install bundler --no-rdoc --no-ri
# Add application
RUN mkdir /myapp
WORKDIR /myapp
ONBUILD ADD ./Gemfile /myapp/Gemfile
ONBUILD RUN bundle install
ONBUILD ADD ./ /myapp
ONBUILD ENTRYPOINT ["bash", "-l", "-c"]
ONBUILD CMD ["rake db:create && rake db:migrate && rails server"]
ENTRYPOINT ["bash", "-l", "-c"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.