-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (31 loc) · 833 Bytes
/
Dockerfile
File metadata and controls
35 lines (31 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
ARG RUBY_PATH=/usr/local
ARG RUBY_VERSION=3.1.0
ARG RUBY_CONFIGURE_OPTS=--with-jemalloc
FROM drecom/centos-base:7 AS rubybuild
ARG RUBY_PATH
ARG RUBY_VERSION
ARG RUBY_CONFIGURE_OPTS
RUN git clone git://github.com/rbenv/ruby-build.git $RUBY_PATH/plugins/ruby-build \
&& $RUBY_PATH/plugins/ruby-build/install.sh
RUN yum -y install jemalloc-devel \
openssl-devel
RUN RUBY_CONFIGURE_OPTS=$RUBY_CONFIGURE_OPTS ruby-build $RUBY_VERSION $RUBY_PATH/
FROM centos:7
ARG RUBY_PATH
ENV PATH $RUBY_PATH/bin:$PATH
RUN yum -y install \
epel-release
RUN yum -y install \
jemalloc-devel \
make \
gcc \
git \
openssl-devel \
zlib-devel \
mysql-devel \
redis \
sqlite-devel \
bzip2
COPY --from=rubybuild $RUBY_PATH $RUBY_PATH
RUN gem update --system
CMD [ "irb" ]