@@ -74,30 +74,30 @@ ENV BASH_ENV=/etc/rubybashrc
74
74
##
75
75
USER rubyuser
76
76
77
- ENV RBENV_RUBIES="2.5.9 3.1.6"
77
+ ENV RBENV_RUBIES="2.5.9 3.1.6 3.4.1 "
78
78
79
79
# Install the bootstrap rubies
80
80
RUN bash -c " \
81
- echo 'gem: --no-ri --no-rdoc --no-document' > > ~/.gemrc && \
82
- export CFLAGS='-s -O3 -fno-fast-math -fPIC' && \
83
- for v in ${RBENV_RUBIES} ; do \
84
- rbenv install \$v -- --disable-install-doc ; \
85
- done && \
86
- find ${RBENV_ROOT} -type d -print0 | sudo xargs -0 chmod g+w \
87
- "
81
+ echo 'gem: --no-ri --no-rdoc --no-document' > > ~/.gemrc && \
82
+ export CFLAGS='-s -O3 -fno-fast-math -fPIC' && \
83
+ for v in ${RBENV_RUBIES} ; do \
84
+ rbenv install \$v -- --disable-install-doc ; \
85
+ done && \
86
+ find ${RBENV_ROOT} -type d -print0 | sudo xargs -0 chmod g+w \
87
+ "
88
88
89
89
# Install rake-compiler and patch it to build and install static libraries for Linux rubies
90
90
COPY build/patches /home/rubyuser/patches
91
91
RUN bash -c " \
92
- for v in ${RBENV_RUBIES} ; do \
93
- rbenv shell \$v && \
94
- gem install rake-compiler -v1.2.9 && \
95
- cd ${RBENV_ROOT}/versions/\$v/lib/ruby/gems/*/gems/rake-compiler-1.2.9 && \
96
- for patch in /home/rubyuser/patches/rake-compiler-1.2.9/*.patch ; do \
97
- patch -p1 < \$patch ; \
98
- done \
99
- done \
100
- "
92
+ for v in ${RBENV_RUBIES} ; do \
93
+ rbenv shell \$v && \
94
+ gem install rake-compiler -v1.2.9 && \
95
+ cd ${RBENV_ROOT}/versions/\$v/lib/ruby/gems/*/gems/rake-compiler-1.2.9 && \
96
+ for patch in /home/rubyuser/patches/rake-compiler-1.2.9/*.patch ; do \
97
+ patch -p1 < \$patch ; \
98
+ done \
99
+ done \
100
+ "
101
101
102
102
# Install rake-compiler's cross rubies in global dir instead of /root
103
103
RUN sudo mkdir -p /usr/local/rake-compiler && \
@@ -115,7 +115,7 @@ RUN sudo mkdir -p /usr/local/rake-compiler && \
115
115
xrubies_build_plan = if platform =~ /x64-mingw-ucrt/
116
116
[
117
117
# Rubyinstaller-3.1+ is platform x64-mingw-ucrt
118
- [ "3.4.1:3.3.5:3.2.6:3.1.6" , "3.1.6 " ] ,
118
+ [ "3.4.1:3.3.5:3.2.6:3.1.6" , "3.4.1 " ] ,
119
119
]
120
120
elsif platform =~ /x64-mingw32/
121
121
[
@@ -126,24 +126,25 @@ elsif platform =~ /x64-mingw32/
126
126
else
127
127
[
128
128
[ "2.6.10:2.5.9:2.4.10" , "2.5.9" ] ,
129
- [ "3.4.1:3.3.5:3.2.6:3.1.6:3.0.7:2.7.8" , "3.1.6" ] ,
129
+ [ "2.7.8" , "3.1.6" ] ,
130
+ [ "3.4.1:3.3.5:3.2.6:3.1.6:3.0.7" , "3.4.1" ] ,
130
131
]
131
132
end
132
133
133
134
strip = '-s' if platform !~ /darwin/
134
135
135
136
xrubies_build_plan . each do |xrubies , bootstrap_ruby_version | %>
136
137
RUN bash -c " \
137
- rbenv shell <%= bootstrap_ruby_version %> && \
138
- export CPPFLAGS='<%= "-D__USE_MINGW_ANSI_STDIO=1" if platform =~ /x64-mingw-ucrt/ %> ' && \
139
- export CFLAGS='-O1 -fno-omit-frame-pointer -fno-fast-math -fstack-protector-strong <%= strip %> ' && \
140
- export LDFLAGS='-pipe <%= strip %> ' && \
141
- <%= "export LIBS='-l:libssp.a' &&" if platform =~ /mingw/ %> \
142
- <%= "export CC=#{ target } -clang &&" if platform =~ /darwin/ %> \
143
- export MAKE='make V=1' && \
144
- rake-compiler cross-ruby VERSION=<%= xrubies %> HOST=<%= target %> && \
145
- rm -rf ~/.rake-compiler/builds ~/.rake-compiler/sources \
146
- "
138
+ rbenv shell <%= bootstrap_ruby_version %> && \
139
+ export CPPFLAGS='<%= "-D__USE_MINGW_ANSI_STDIO=1" if platform =~ /x64-mingw-ucrt/ %> ' && \
140
+ export CFLAGS='-O1 -fno-omit-frame-pointer -fno-fast-math -fstack-protector-strong <%= strip %> ' && \
141
+ export LDFLAGS='-pipe <%= strip %> ' && \
142
+ <%= "export LIBS='-l:libssp.a' &&" if platform =~ /mingw/ %> \
143
+ <%= "export CC=#{ target } -clang &&" if platform =~ /darwin/ %> \
144
+ export MAKE='make V=1' && \
145
+ rake-compiler cross-ruby VERSION=<%= xrubies %> HOST=<%= target %> && \
146
+ rm -rf ~/.rake-compiler/builds ~/.rake-compiler/sources \
147
+ "
147
148
<% end %>
148
149
# "
149
150
@@ -223,7 +224,7 @@ RUN echo 'source /etc/profile.d/rcd-env.sh' >> /etc/rubybashrc
223
224
# Install sudoers configuration
224
225
COPY build/sudoers /etc/sudoers.d/rake-compiler-dock
225
226
226
- RUN bash -c "rbenv global 3.1.6 "
227
+ RUN bash -c "rbenv global 3.4.1 "
227
228
228
229
ENV RUBY_CC_VERSION=3.4.1:3.3.5:3.2.6:3.1.6:3.0.7:2.7.8:2.6.10:2.5.9:2.4.10
229
230
0 commit comments