Skip to content

Commit 564e662

Browse files
committed
ruby 3 build needs gcc 10
1 parent 95d06ba commit 564e662

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

static-builder-gnu.Dockerfile

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ RUN curl -o cmake.tgz -fsSL https://github.com/Kitware/CMake/releases/download/v
6565
tar -xzf cmake.tgz -C /cmake --strip-components 1 && \
6666
rm cmake.tgz
6767

68-
# install tools to build packages, if requested
69-
RUN if [ "${BUILD_PACKAGES}" != "" ]; then \
70-
yum install -y ruby rpm-build && \
71-
gem install fpm; \
72-
fi
73-
7468
# install build essentials
7569
RUN yum install -y \
7670
perl \
@@ -127,6 +121,20 @@ ENV EXTENSION_DIR='/usr/lib/frankenphp/modules'
127121
# not sure if this is needed
128122
ENV COMPOSER_ALLOW_SUPERUSER=1
129123

124+
# install tools to build packages, if requested - needs gcc 10
125+
RUN if [ "${BUILD_PACKAGES}" != "" ]; then \
126+
yum install -y make bzip2 openssl-devel libffi-devel zlib-devel libyaml libyaml-devel && \
127+
curl -o ruby.tar.gz -fsSL https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.2.tar.gz && \
128+
tar -xzf ruby.tar.gz && \
129+
cd ruby-3.2.2 && \
130+
./configure --without-baseruby && \
131+
make && \
132+
make install && \
133+
cd .. && \
134+
rm -rf ruby-3.2.2 ruby.tar.gz && \
135+
gem install fpm; \
136+
fi
137+
130138
WORKDIR /go/src/app
131139
COPY go.mod go.sum ./
132140
RUN go mod graph | awk '{if ($1 !~ "@") print $2}' | xargs go get

0 commit comments

Comments
 (0)