Last active
April 11, 2019 08:19
-
-
Save whomwah/9454fee5f21e6fcc77f9ea1b003243a9 to your computer and use it in GitHub Desktop.
[Legacy Ruby Docker] Simple Dockerfile that does legacy Ruby, for Rails Apps #docker
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:16.04 | |
MAINTAINER john@doe.com | |
ENV REFRESHED_AT 2016-07-27 | |
# Choose your ruby version | |
ENV RUBY_VERSION 'ruby 2.2' | |
# Install packages | |
RUN apt-get update && apt-get -y install wget \ | |
build-essential \ | |
libgdbm-dev \ | |
libncurses5-dev \ | |
libffi-dev \ | |
libyaml-dev \ | |
libreadline-dev \ | |
libpq-dev \ | |
nodejs \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Install Ruby-Install | |
RUN wget -O ruby-install-0.6.0.tar.gz https://github.com/postmodern/ruby-install/archive/v0.6.0.tar.gz \ | |
&& tar -xzvf ruby-install-0.6.0.tar.gz \ | |
&& cd ruby-install-0.6.0/ \ | |
&& make install \ | |
&& rm -rf /usr/local/src/* | |
# Install Ruby | |
RUN ruby-install --system $RUBY_VERSION | |
# Install RubyGems | |
RUN gem update --system --no-rdoc --no-ri | |
# Install Bundler | |
RUN gem install bundler --no-rdoc --no-ri | |
# Setup app location | |
RUN mkdir -p /app | |
WORKDIR /app | |
# Install gems | |
ADD Gemfile /app/Gemfile | |
ADD Gemfile.lock /app/Gemfile.lock | |
RUN bundle install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment