Skip to content

Commit 1b71999

Browse files
jesperjohanssongengjiawen
authored andcommitted
Add ruby-install step for installing latest Ruby (#66)
* Add ruby-build and Ruby 2.4.9 installation step * Update Ruby installation to use ruby-install * Remove ruby-full in favor of ruby-install installation
1 parent 356a177 commit 1b71999

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

Dockerfile

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,28 @@ RUN apt update -qq && apt install -qq -y --no-install-recommends \
2929
openjdk-8-jre \
3030
gnupg2 \
3131
python \
32-
ruby-full \
3332
openssh-client \
3433
unzip \
3534
&& rm -rf /var/lib/apt/lists/*;
3635

36+
# install latest Ruby using ruby-install
37+
RUN apt-get update -qq \
38+
&& apt-get install -qq -y --no-install-recommends \
39+
bison \
40+
zlib1g-dev \
41+
libyaml-dev \
42+
libssl-dev \
43+
libgdbm-dev \
44+
libreadline-dev \
45+
libncurses5-dev \
46+
libffi-dev \
47+
&& curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz | tar -zxvf - -C /tmp/ \
48+
&& cd /tmp/ruby-install-* \
49+
&& make install \
50+
&& ruby-install --latest --system --cleanup ruby \
51+
&& gem install bundler -N \
52+
&& rm -rf /var/lib/apt/lists/*
53+
3754
# install nodejs and yarn packages from nodesource and yarn apt sources
3855
RUN echo "deb https://deb.nodesource.com/node_${NODE_VERSION} stretch main" > /etc/apt/sources.list.d/nodesource.list \
3956
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \

0 commit comments

Comments
 (0)