RUBY_VERSION=2.3.3 make
Last active
December 14, 2016 06:52
-
-
Save gofer/34efc46b343f2309cac13ddf15dbe091 to your computer and use it in GitHub Desktop.
Dockerfile: Ruby on CentOS
This file contains hidden or 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 centos:latest | |
MAINTAINER Gofer (@gofer_ex) <[email protected]> | |
ARG RUBY_VERSION=2.3.3 | |
RUN yum -y install make git gcc | |
RUN yum -y install gdbm openssl readline zlib | |
RUN yum -y install gdbm-devel openssl-devel readline-devel zlib-devel | |
WORKDIR /usr/local/src | |
RUN curl -O https://cache.ruby-lang.org/pub/ruby/`echo $RUBY_VERSION | sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+)/\1\.\2/g'`/ruby-$RUBY_VERSION.tar.gz && tar xf ruby-$RUBY_VERSION.tar.gz | |
WORKDIR /usr/local/src/ruby-$RUBY_VERSION | |
RUN ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --enable-pthread && make && make install | |
RUN rm -f ruby-$RUBY_VERSION* | |
RUN yum -y remove gdbm-devel openssl-devel readline-devel zlib-devel | |
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
RUN gem install bundler | |
WORKDIR / | |
ENTRYPOINT /bin/bash |
This file contains hidden or 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
all: | |
docker build --build-arg RUBY_VERSION=${RUBY_VERSION} -t ruby-centos:${RUBY_VERSION} . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment