-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (49 loc) · 1.46 KB
/
Dockerfile
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
ARG RUBY_PATH=/usr/local
ARG RUBY_VERSION=3.1.0
ARG RUBY_CONFIGURE_OPTS=--with-jemalloc
FROM rockylinux:9 AS rubybuild
ARG RUBY_PATH
ARG RUBY_VERSION
ARG RUBY_CONFIGURE_OPTS
RUN yum -y install \
epel-release \
git \
autoconf \
gcc \
make \
readline-devel \
zlib-devel \
openssl-devel \
libffi-devel \
libxslt-devel
RUN dnf config-manager --set-enabled crb
RUN yum -y install \
mysql-devel \
ImageMagick-devel
RUN git clone https://github.com/jemalloc/jemalloc.git
RUN cd jemalloc/ && ./autogen.sh && ./configure && make && make install && cd ../ && rm -rf jemalloc/
RUN git clone https://github.com/rbenv/ruby-build.git $RUBY_PATH/plugins/ruby-build \
&& $RUBY_PATH/plugins/ruby-build/install.sh
RUN LD_LIBRARY_PATH=/usr/local/lib RUBY_CONFIGURE_OPTS=$RUBY_CONFIGURE_OPTS ruby-build $RUBY_VERSION $RUBY_PATH/
FROM rockylinux:9
ARG RUBY_PATH
ENV PATH $RUBY_PATH/bin:$PATH
RUN yum -y install \
epel-release
RUN yum -y install \
autoconf \
make \
gcc \
git \
openssl-devel \
zlib-devel \
mysql \
redis \
sqlite-devel \
bzip2
RUN dnf config-manager --set-enabled crb
RUN git clone https://github.com/jemalloc/jemalloc.git
RUN cd jemalloc/ && ./autogen.sh && ./configure && make && make install && cd ../ && rm -rf jemalloc/
COPY --from=rubybuild $RUBY_PATH $RUBY_PATH
RUN gem update --system
CMD [ "irb" ]