LoginSignup
6
6

More than 5 years have passed since last update.

DockerでRuby-2.2.0の実行環境を作る。

Posted at

dockerの動作する環境で、
以下のテキストを Dockerfile という名前のファイルに貼り付けて
$ docker build -t ruby:2.2.0 . を実行する

Dockerfile:

FROM ruby
RUN apt-get update
RUN apt-get install -y bison wget
RUN wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.0-preview2.tar.gz
RUN tar zxvf ruby-2.2.0-preview2.tar.gz
WORKDIR /ruby-2.2.0-preview2
RUN autoconf
RUN ./configure
RUN make
RUN make install

遊ぶときは、
$ docker run --rm -ti ruby:2.2.0 /bin/bash
で、仮想環境に入れるので、rubyコマンドなどを叩いて遊ぼう。

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6