@@ -10,28 +10,6 @@ RUN apt-get -y update && \
10
10
apt-get install -y autoconf cmake pkg-config zlib1g-dev libreadline-dev libsqlite0-dev libssl-dev libyaml-dev libffi-dev && \
11
11
rm -rf /var/lib/apt/lists/*
12
12
13
- ##
14
- ## install rbenv and ruby-build
15
- ##
16
- RUN groupadd -r rubyuser && useradd -r -g rubyuser -G sudo -p "" --create-home rubyuser
17
-
18
- ENV RBENV_ROOT=/usr/local/rbenv RBENV_RUBIES="2.5.9 3.1.3"
19
-
20
- # chown after running `rbenv init` because that command creates some subdirectories
21
- RUN git clone https://github.com/rbenv/rbenv.git ${RBENV_ROOT} && \
22
- git clone https://github.com/rbenv/ruby-build.git ${RBENV_ROOT}/plugins/ruby-build && \
23
- \
24
- echo "export RBENV_ROOT=/usr/local/rbenv" >> /etc/rubybashrc && \
25
- echo "export PATH=$RBENV_ROOT/bin:\$PATH" > > /etc/rubybashrc && \
26
- $RBENV_ROOT/bin/rbenv init - --no-rehash bash > > /etc/rubybashrc && \
27
- echo "source /etc/rubybashrc" > > /etc/bashrc && \
28
- echo "source /etc/rubybashrc" > > /etc/bash.bashrc && \
29
- \
30
- chown -R rubyuser:rubyuser ${RBENV_ROOT} && \
31
- find ${RBENV_ROOT} -type d -print0 | sudo xargs -0 chmod g+sw
32
- ENV BASH_ENV=/etc/rubybashrc
33
-
34
-
35
13
##
36
14
## Install cross compilers
37
15
##
@@ -69,11 +47,35 @@ RUN /tmp/mk_osxcross.sh
69
47
<% end %>
70
48
71
49
50
+ ##
51
+ ## install rbenv and ruby-build
52
+ ##
53
+ RUN groupadd -r rubyuser && useradd -r -g rubyuser -G sudo -p "" --create-home rubyuser
54
+
55
+ ENV RBENV_ROOT=/usr/local/rbenv
56
+
57
+ # chown after running `rbenv init` because that command creates some subdirectories
58
+ RUN git clone https://github.com/rbenv/rbenv.git ${RBENV_ROOT} && \
59
+ git clone https://github.com/rbenv/ruby-build.git ${RBENV_ROOT}/plugins/ruby-build && \
60
+ \
61
+ echo "export RBENV_ROOT=/usr/local/rbenv" >> /etc/rubybashrc && \
62
+ echo "export PATH=$RBENV_ROOT/bin:\$PATH" > > /etc/rubybashrc && \
63
+ $RBENV_ROOT/bin/rbenv init - --no-rehash bash > > /etc/rubybashrc && \
64
+ echo "source /etc/rubybashrc" > > /etc/bashrc && \
65
+ echo "source /etc/rubybashrc" > > /etc/bash.bashrc && \
66
+ \
67
+ chown -R rubyuser:rubyuser ${RBENV_ROOT} && \
68
+ find ${RBENV_ROOT} -type d -print0 | sudo xargs -0 chmod g+sw
69
+ ENV BASH_ENV=/etc/rubybashrc
70
+
71
+
72
72
##
73
73
## set up rake-compiler and install bootstrap rubies
74
74
##
75
75
USER rubyuser
76
76
77
+ ENV RBENV_RUBIES="2.5.9 3.1.6"
78
+
77
79
# Install the bootstrap rubies
78
80
RUN bash -c " \
79
81
echo 'gem: --no-ri --no-rdoc --no-document' > > ~/.gemrc && \
@@ -111,18 +113,18 @@ RUN sudo mkdir -p /usr/local/rake-compiler && \
111
113
xrubies_build_plan = if platform =~ /x64-mingw-ucrt/
112
114
[
113
115
# Rubyinstaller-3.1.0+ is platform x64-mingw-ucrt
114
- [ "3.4.1:3.3.5:3.2.0:3.1.0" , "3.1.3 " ] ,
116
+ [ "3.4.1:3.3.5:3.2.0:3.1.0" , "3.1.6 " ] ,
115
117
]
116
118
elsif platform =~ /x64-mingw32/
117
119
[
118
120
# Rubyinstaller prior to 3.1.0 is platform x64-mingw32
119
121
[ "2.6.0:2.5.0:2.4.0" , "2.5.9" ] ,
120
- [ "3.0.0:2.7.0" , "3.1.3 " ] ,
122
+ [ "3.0.0:2.7.0" , "3.1.6 " ] ,
121
123
]
122
124
else
123
125
[
124
126
[ "2.6.0:2.5.0:2.4.0" , "2.5.9" ] ,
125
- [ "3.4.1:3.3.5:3.2.0:3.1.0:3.0.0:2.7.0" , "3.1.3 " ] ,
127
+ [ "3.4.1:3.3.5:3.2.0:3.1.0:3.0.0:2.7.0" , "3.1.6 " ] ,
126
128
]
127
129
end
128
130
@@ -167,9 +169,9 @@ RUN find /usr/local/rake-compiler/ruby -name rbconfig.rb | while read f ; do sed
167
169
<% if platform =~ /darwin/ %>
168
170
# ruby-3.2+ on darwin links with `-bundle_loader`,
169
171
# - see https://github.com/rake-compiler/rake-compiler-dock/issues/87
170
- # - note that we do this for "3.[2-9].0 " to match rubies 3.2 and later
171
- # - and we add a "*" on the end for "3.[2-9].0*" to match prereleases like "3.3.0+0"
172
- RUN find /usr/local/rake-compiler/ruby/*/*/lib/ruby/3.[2-9].0 * -name rbconfig.rb | \
172
+ # - note that we do this for "3.[2-9].* " to match rubies 3.2 and later
173
+ # - and we use a "*" on the end instead of a digit to match prereleases like "3.3.0+0"
174
+ RUN find /usr/local/rake-compiler/ruby/*/*/lib/ruby/3.[2-9].* -name rbconfig.rb | \
173
175
while read f ; do sed -i 's/\["EXTDLDFLAGS"\] = "/&-Wl,-flat_namespace /' $f ; done
174
176
<% end %>
175
177
@@ -216,7 +218,7 @@ RUN echo 'source /etc/profile.d/rcd-env.sh' >> /etc/rubybashrc
216
218
# Install sudoers configuration
217
219
COPY build/sudoers /etc/sudoers.d/rake-compiler-dock
218
220
219
- RUN bash -c "rbenv global 3.1.3 "
221
+ RUN bash -c "rbenv global 3.1.6 "
220
222
221
223
ENV RUBY_CC_VERSION=3.4.1:3.3.5:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0:2.5.0:2.4.0
222
224
0 commit comments