mirror of
https://github.com/docker-library/ruby.git
synced 2022-11-09 11:41:34 -05:00
Apply update.sh
This commit is contained in:
parent
d85cf42c55
commit
281978ef87
9 changed files with 210 additions and 69 deletions
|
@ -13,8 +13,9 @@ ENV RUBY_DOWNLOAD_SHA256 fb2e454d7a5e5a39eb54db0ec666f53eeb6edc593d1d2b970ae4d15
|
|||
ENV RUBYGEMS_VERSION 2.6.6
|
||||
|
||||
# some of ruby's build scripts are written in ruby
|
||||
# we purge this later to make sure our final image uses what we just built
|
||||
# we purge system ruby later to make sure our final image uses what we just built
|
||||
RUN set -ex \
|
||||
\
|
||||
&& buildDeps=' \
|
||||
bison \
|
||||
libgdbm-dev \
|
||||
|
@ -23,20 +24,35 @@ RUN set -ex \
|
|||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends $buildDeps \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -fSL -o ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
\
|
||||
&& wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
|
||||
\
|
||||
&& mkdir -p /usr/src/ruby \
|
||||
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
|
||||
&& rm ruby.tar.gz \
|
||||
\
|
||||
&& cd /usr/src/ruby \
|
||||
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
|
||||
\
|
||||
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
|
||||
# warning: Insecure world writable dir
|
||||
&& { \
|
||||
echo '#define ENABLE_PATH_CHECK 0'; \
|
||||
echo; \
|
||||
cat file.c; \
|
||||
} > file.c.new \
|
||||
&& mv file.c.new file.c \
|
||||
\
|
||||
&& autoconf \
|
||||
&& ./configure --disable-install-doc \
|
||||
&& make -j"$(nproc)" \
|
||||
&& make install \
|
||||
\
|
||||
&& apt-get purge -y --auto-remove $buildDeps \
|
||||
&& gem update --system $RUBYGEMS_VERSION \
|
||||
&& rm -r /usr/src/ruby
|
||||
&& cd / \
|
||||
&& rm -r /usr/src/ruby \
|
||||
\
|
||||
&& gem update --system "$RUBYGEMS_VERSION"
|
||||
|
||||
ENV BUNDLER_VERSION 1.13.1
|
||||
|
||||
|
|
|
@ -13,8 +13,10 @@ ENV RUBY_DOWNLOAD_SHA256 fb2e454d7a5e5a39eb54db0ec666f53eeb6edc593d1d2b970ae4d15
|
|||
ENV RUBYGEMS_VERSION 2.6.6
|
||||
|
||||
# some of ruby's build scripts are written in ruby
|
||||
# we purge this later to make sure our final image uses what we just built
|
||||
# we purge system ruby later to make sure our final image uses what we just built
|
||||
# readline-dev vs libedit-dev: https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
|
||||
RUN set -ex \
|
||||
\
|
||||
&& apk add --no-cache --virtual .ruby-builddeps \
|
||||
autoconf \
|
||||
bison \
|
||||
|
@ -22,7 +24,6 @@ RUN set -ex \
|
|||
bzip2-dev \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
curl \
|
||||
gcc \
|
||||
gdbm-dev \
|
||||
glib-dev \
|
||||
|
@ -33,27 +34,40 @@ RUN set -ex \
|
|||
linux-headers \
|
||||
make \
|
||||
ncurses-dev \
|
||||
openssl \
|
||||
openssl-dev \
|
||||
procps \
|
||||
# https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
|
||||
readline-dev \
|
||||
ruby \
|
||||
tar \
|
||||
yaml-dev \
|
||||
zlib-dev \
|
||||
&& curl -fSL -o ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
\
|
||||
&& wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
|
||||
&& mkdir -p /usr/src \
|
||||
&& tar -xzf ruby.tar.gz -C /usr/src \
|
||||
&& mv "/usr/src/ruby-$RUBY_VERSION" /usr/src/ruby \
|
||||
\
|
||||
&& mkdir -p /usr/src/ruby \
|
||||
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
|
||||
&& rm ruby.tar.gz \
|
||||
\
|
||||
&& cd /usr/src/ruby \
|
||||
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
|
||||
\
|
||||
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
|
||||
# warning: Insecure world writable dir
|
||||
&& { \
|
||||
echo '#define ENABLE_PATH_CHECK 0'; \
|
||||
echo; \
|
||||
cat file.c; \
|
||||
} > file.c.new \
|
||||
&& mv file.c.new file.c \
|
||||
\
|
||||
&& autoconf \
|
||||
# the configure script does not detect isnan/isinf as macros
|
||||
# the configure script does not detect isnan/isinf as macros
|
||||
&& ac_cv_func_isnan=yes ac_cv_func_isinf=yes \
|
||||
./configure --disable-install-doc \
|
||||
&& make -j"$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& make install \
|
||||
\
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner --recursive /usr/local \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
|
@ -64,15 +78,16 @@ RUN set -ex \
|
|||
&& apk add --virtual .ruby-rundeps $runDeps \
|
||||
bzip2 \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libffi-dev \
|
||||
openssl-dev \
|
||||
yaml-dev \
|
||||
procps \
|
||||
zlib-dev \
|
||||
&& apk del .ruby-builddeps \
|
||||
&& gem update --system $RUBYGEMS_VERSION \
|
||||
&& rm -r /usr/src/ruby
|
||||
&& cd / \
|
||||
&& rm -r /usr/src/ruby \
|
||||
\
|
||||
&& gem update --system "$RUBYGEMS_VERSION"
|
||||
|
||||
ENV BUNDLER_VERSION 1.13.1
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ RUN apt-get update \
|
|||
&& apt-get install -y --no-install-recommends \
|
||||
bzip2 \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libffi-dev \
|
||||
libgdbm3 \
|
||||
libssl-dev \
|
||||
|
@ -26,8 +25,9 @@ ENV RUBY_DOWNLOAD_SHA256 fb2e454d7a5e5a39eb54db0ec666f53eeb6edc593d1d2b970ae4d15
|
|||
ENV RUBYGEMS_VERSION 2.6.6
|
||||
|
||||
# some of ruby's build scripts are written in ruby
|
||||
# we purge this later to make sure our final image uses what we just built
|
||||
# we purge system ruby later to make sure our final image uses what we just built
|
||||
RUN set -ex \
|
||||
\
|
||||
&& buildDeps=' \
|
||||
autoconf \
|
||||
bison \
|
||||
|
@ -41,24 +41,40 @@ RUN set -ex \
|
|||
libxslt-dev \
|
||||
make \
|
||||
ruby \
|
||||
wget \
|
||||
' \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends $buildDeps \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -fSL -o ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
\
|
||||
&& wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
|
||||
\
|
||||
&& mkdir -p /usr/src/ruby \
|
||||
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
|
||||
&& rm ruby.tar.gz \
|
||||
\
|
||||
&& cd /usr/src/ruby \
|
||||
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
|
||||
\
|
||||
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
|
||||
# warning: Insecure world writable dir
|
||||
&& { \
|
||||
echo '#define ENABLE_PATH_CHECK 0'; \
|
||||
echo; \
|
||||
cat file.c; \
|
||||
} > file.c.new \
|
||||
&& mv file.c.new file.c \
|
||||
\
|
||||
&& autoconf \
|
||||
&& ./configure --disable-install-doc \
|
||||
&& make -j"$(nproc)" \
|
||||
&& make install \
|
||||
\
|
||||
&& apt-get purge -y --auto-remove $buildDeps \
|
||||
&& gem update --system $RUBYGEMS_VERSION \
|
||||
&& rm -r /usr/src/ruby
|
||||
&& cd / \
|
||||
&& rm -r /usr/src/ruby \
|
||||
\
|
||||
&& gem update --system "$RUBYGEMS_VERSION"
|
||||
|
||||
ENV BUNDLER_VERSION 1.13.1
|
||||
|
||||
|
|
|
@ -13,8 +13,9 @@ ENV RUBY_DOWNLOAD_SHA256 30c4b31697a4ca4ea0c8db8ad30cf45e6690a0f09687e5d483c933c
|
|||
ENV RUBYGEMS_VERSION 2.6.6
|
||||
|
||||
# some of ruby's build scripts are written in ruby
|
||||
# we purge this later to make sure our final image uses what we just built
|
||||
# we purge system ruby later to make sure our final image uses what we just built
|
||||
RUN set -ex \
|
||||
\
|
||||
&& buildDeps=' \
|
||||
bison \
|
||||
libgdbm-dev \
|
||||
|
@ -23,20 +24,35 @@ RUN set -ex \
|
|||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends $buildDeps \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -fSL -o ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
\
|
||||
&& wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
|
||||
\
|
||||
&& mkdir -p /usr/src/ruby \
|
||||
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
|
||||
&& rm ruby.tar.gz \
|
||||
\
|
||||
&& cd /usr/src/ruby \
|
||||
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
|
||||
\
|
||||
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
|
||||
# warning: Insecure world writable dir
|
||||
&& { \
|
||||
echo '#define ENABLE_PATH_CHECK 0'; \
|
||||
echo; \
|
||||
cat file.c; \
|
||||
} > file.c.new \
|
||||
&& mv file.c.new file.c \
|
||||
\
|
||||
&& autoconf \
|
||||
&& ./configure --disable-install-doc \
|
||||
&& make -j"$(nproc)" \
|
||||
&& make install \
|
||||
\
|
||||
&& apt-get purge -y --auto-remove $buildDeps \
|
||||
&& gem update --system $RUBYGEMS_VERSION \
|
||||
&& rm -r /usr/src/ruby
|
||||
&& cd / \
|
||||
&& rm -r /usr/src/ruby \
|
||||
\
|
||||
&& gem update --system "$RUBYGEMS_VERSION"
|
||||
|
||||
ENV BUNDLER_VERSION 1.13.1
|
||||
|
||||
|
|
|
@ -13,8 +13,10 @@ ENV RUBY_DOWNLOAD_SHA256 30c4b31697a4ca4ea0c8db8ad30cf45e6690a0f09687e5d483c933c
|
|||
ENV RUBYGEMS_VERSION 2.6.6
|
||||
|
||||
# some of ruby's build scripts are written in ruby
|
||||
# we purge this later to make sure our final image uses what we just built
|
||||
# we purge system ruby later to make sure our final image uses what we just built
|
||||
# readline-dev vs libedit-dev: https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
|
||||
RUN set -ex \
|
||||
\
|
||||
&& apk add --no-cache --virtual .ruby-builddeps \
|
||||
autoconf \
|
||||
bison \
|
||||
|
@ -22,7 +24,6 @@ RUN set -ex \
|
|||
bzip2-dev \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
curl \
|
||||
gcc \
|
||||
gdbm-dev \
|
||||
glib-dev \
|
||||
|
@ -33,27 +34,40 @@ RUN set -ex \
|
|||
linux-headers \
|
||||
make \
|
||||
ncurses-dev \
|
||||
openssl \
|
||||
openssl-dev \
|
||||
procps \
|
||||
# https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
|
||||
readline-dev \
|
||||
ruby \
|
||||
tar \
|
||||
yaml-dev \
|
||||
zlib-dev \
|
||||
&& curl -fSL -o ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
\
|
||||
&& wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
|
||||
&& mkdir -p /usr/src \
|
||||
&& tar -xzf ruby.tar.gz -C /usr/src \
|
||||
&& mv "/usr/src/ruby-$RUBY_VERSION" /usr/src/ruby \
|
||||
\
|
||||
&& mkdir -p /usr/src/ruby \
|
||||
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
|
||||
&& rm ruby.tar.gz \
|
||||
\
|
||||
&& cd /usr/src/ruby \
|
||||
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
|
||||
\
|
||||
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
|
||||
# warning: Insecure world writable dir
|
||||
&& { \
|
||||
echo '#define ENABLE_PATH_CHECK 0'; \
|
||||
echo; \
|
||||
cat file.c; \
|
||||
} > file.c.new \
|
||||
&& mv file.c.new file.c \
|
||||
\
|
||||
&& autoconf \
|
||||
# the configure script does not detect isnan/isinf as macros
|
||||
# the configure script does not detect isnan/isinf as macros
|
||||
&& ac_cv_func_isnan=yes ac_cv_func_isinf=yes \
|
||||
./configure --disable-install-doc \
|
||||
&& make -j"$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& make install \
|
||||
\
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner --recursive /usr/local \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
|
@ -64,15 +78,16 @@ RUN set -ex \
|
|||
&& apk add --virtual .ruby-rundeps $runDeps \
|
||||
bzip2 \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libffi-dev \
|
||||
openssl-dev \
|
||||
yaml-dev \
|
||||
procps \
|
||||
zlib-dev \
|
||||
&& apk del .ruby-builddeps \
|
||||
&& gem update --system $RUBYGEMS_VERSION \
|
||||
&& rm -r /usr/src/ruby
|
||||
&& cd / \
|
||||
&& rm -r /usr/src/ruby \
|
||||
\
|
||||
&& gem update --system "$RUBYGEMS_VERSION"
|
||||
|
||||
ENV BUNDLER_VERSION 1.13.1
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ RUN apt-get update \
|
|||
&& apt-get install -y --no-install-recommends \
|
||||
bzip2 \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libffi-dev \
|
||||
libgdbm3 \
|
||||
libssl-dev \
|
||||
|
@ -26,8 +25,9 @@ ENV RUBY_DOWNLOAD_SHA256 30c4b31697a4ca4ea0c8db8ad30cf45e6690a0f09687e5d483c933c
|
|||
ENV RUBYGEMS_VERSION 2.6.6
|
||||
|
||||
# some of ruby's build scripts are written in ruby
|
||||
# we purge this later to make sure our final image uses what we just built
|
||||
# we purge system ruby later to make sure our final image uses what we just built
|
||||
RUN set -ex \
|
||||
\
|
||||
&& buildDeps=' \
|
||||
autoconf \
|
||||
bison \
|
||||
|
@ -41,24 +41,40 @@ RUN set -ex \
|
|||
libxslt-dev \
|
||||
make \
|
||||
ruby \
|
||||
wget \
|
||||
' \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends $buildDeps \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -fSL -o ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
\
|
||||
&& wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
|
||||
\
|
||||
&& mkdir -p /usr/src/ruby \
|
||||
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
|
||||
&& rm ruby.tar.gz \
|
||||
\
|
||||
&& cd /usr/src/ruby \
|
||||
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
|
||||
\
|
||||
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
|
||||
# warning: Insecure world writable dir
|
||||
&& { \
|
||||
echo '#define ENABLE_PATH_CHECK 0'; \
|
||||
echo; \
|
||||
cat file.c; \
|
||||
} > file.c.new \
|
||||
&& mv file.c.new file.c \
|
||||
\
|
||||
&& autoconf \
|
||||
&& ./configure --disable-install-doc \
|
||||
&& make -j"$(nproc)" \
|
||||
&& make install \
|
||||
\
|
||||
&& apt-get purge -y --auto-remove $buildDeps \
|
||||
&& gem update --system $RUBYGEMS_VERSION \
|
||||
&& rm -r /usr/src/ruby
|
||||
&& cd / \
|
||||
&& rm -r /usr/src/ruby \
|
||||
\
|
||||
&& gem update --system "$RUBYGEMS_VERSION"
|
||||
|
||||
ENV BUNDLER_VERSION 1.13.1
|
||||
|
||||
|
|
|
@ -13,8 +13,9 @@ ENV RUBY_DOWNLOAD_SHA256 b87c738cb2032bf4920fef8e3864dc5cf8eae9d89d8d523ce023694
|
|||
ENV RUBYGEMS_VERSION 2.6.6
|
||||
|
||||
# some of ruby's build scripts are written in ruby
|
||||
# we purge this later to make sure our final image uses what we just built
|
||||
# we purge system ruby later to make sure our final image uses what we just built
|
||||
RUN set -ex \
|
||||
\
|
||||
&& buildDeps=' \
|
||||
bison \
|
||||
libgdbm-dev \
|
||||
|
@ -23,20 +24,35 @@ RUN set -ex \
|
|||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends $buildDeps \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -fSL -o ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
\
|
||||
&& wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
|
||||
\
|
||||
&& mkdir -p /usr/src/ruby \
|
||||
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
|
||||
&& rm ruby.tar.gz \
|
||||
\
|
||||
&& cd /usr/src/ruby \
|
||||
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
|
||||
\
|
||||
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
|
||||
# warning: Insecure world writable dir
|
||||
&& { \
|
||||
echo '#define ENABLE_PATH_CHECK 0'; \
|
||||
echo; \
|
||||
cat file.c; \
|
||||
} > file.c.new \
|
||||
&& mv file.c.new file.c \
|
||||
\
|
||||
&& autoconf \
|
||||
&& ./configure --disable-install-doc \
|
||||
&& make -j"$(nproc)" \
|
||||
&& make install \
|
||||
\
|
||||
&& apt-get purge -y --auto-remove $buildDeps \
|
||||
&& gem update --system $RUBYGEMS_VERSION \
|
||||
&& rm -r /usr/src/ruby
|
||||
&& cd / \
|
||||
&& rm -r /usr/src/ruby \
|
||||
\
|
||||
&& gem update --system "$RUBYGEMS_VERSION"
|
||||
|
||||
ENV BUNDLER_VERSION 1.13.1
|
||||
|
||||
|
|
|
@ -13,8 +13,10 @@ ENV RUBY_DOWNLOAD_SHA256 b87c738cb2032bf4920fef8e3864dc5cf8eae9d89d8d523ce023694
|
|||
ENV RUBYGEMS_VERSION 2.6.6
|
||||
|
||||
# some of ruby's build scripts are written in ruby
|
||||
# we purge this later to make sure our final image uses what we just built
|
||||
# we purge system ruby later to make sure our final image uses what we just built
|
||||
# readline-dev vs libedit-dev: https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
|
||||
RUN set -ex \
|
||||
\
|
||||
&& apk add --no-cache --virtual .ruby-builddeps \
|
||||
autoconf \
|
||||
bison \
|
||||
|
@ -22,7 +24,6 @@ RUN set -ex \
|
|||
bzip2-dev \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
curl \
|
||||
gcc \
|
||||
gdbm-dev \
|
||||
glib-dev \
|
||||
|
@ -33,27 +34,40 @@ RUN set -ex \
|
|||
linux-headers \
|
||||
make \
|
||||
ncurses-dev \
|
||||
openssl \
|
||||
openssl-dev \
|
||||
procps \
|
||||
# https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
|
||||
readline-dev \
|
||||
ruby \
|
||||
tar \
|
||||
yaml-dev \
|
||||
zlib-dev \
|
||||
&& curl -fSL -o ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
\
|
||||
&& wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
|
||||
&& mkdir -p /usr/src \
|
||||
&& tar -xzf ruby.tar.gz -C /usr/src \
|
||||
&& mv "/usr/src/ruby-$RUBY_VERSION" /usr/src/ruby \
|
||||
\
|
||||
&& mkdir -p /usr/src/ruby \
|
||||
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
|
||||
&& rm ruby.tar.gz \
|
||||
\
|
||||
&& cd /usr/src/ruby \
|
||||
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
|
||||
\
|
||||
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
|
||||
# warning: Insecure world writable dir
|
||||
&& { \
|
||||
echo '#define ENABLE_PATH_CHECK 0'; \
|
||||
echo; \
|
||||
cat file.c; \
|
||||
} > file.c.new \
|
||||
&& mv file.c.new file.c \
|
||||
\
|
||||
&& autoconf \
|
||||
# the configure script does not detect isnan/isinf as macros
|
||||
# the configure script does not detect isnan/isinf as macros
|
||||
&& ac_cv_func_isnan=yes ac_cv_func_isinf=yes \
|
||||
./configure --disable-install-doc \
|
||||
&& make -j"$(getconf _NPROCESSORS_ONLN)" \
|
||||
&& make install \
|
||||
\
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner --recursive /usr/local \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
|
@ -64,15 +78,16 @@ RUN set -ex \
|
|||
&& apk add --virtual .ruby-rundeps $runDeps \
|
||||
bzip2 \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libffi-dev \
|
||||
openssl-dev \
|
||||
yaml-dev \
|
||||
procps \
|
||||
zlib-dev \
|
||||
&& apk del .ruby-builddeps \
|
||||
&& gem update --system $RUBYGEMS_VERSION \
|
||||
&& rm -r /usr/src/ruby
|
||||
&& cd / \
|
||||
&& rm -r /usr/src/ruby \
|
||||
\
|
||||
&& gem update --system "$RUBYGEMS_VERSION"
|
||||
|
||||
ENV BUNDLER_VERSION 1.13.1
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ RUN apt-get update \
|
|||
&& apt-get install -y --no-install-recommends \
|
||||
bzip2 \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libffi-dev \
|
||||
libgdbm3 \
|
||||
libssl-dev \
|
||||
|
@ -26,8 +25,9 @@ ENV RUBY_DOWNLOAD_SHA256 b87c738cb2032bf4920fef8e3864dc5cf8eae9d89d8d523ce023694
|
|||
ENV RUBYGEMS_VERSION 2.6.6
|
||||
|
||||
# some of ruby's build scripts are written in ruby
|
||||
# we purge this later to make sure our final image uses what we just built
|
||||
# we purge system ruby later to make sure our final image uses what we just built
|
||||
RUN set -ex \
|
||||
\
|
||||
&& buildDeps=' \
|
||||
autoconf \
|
||||
bison \
|
||||
|
@ -41,24 +41,40 @@ RUN set -ex \
|
|||
libxslt-dev \
|
||||
make \
|
||||
ruby \
|
||||
wget \
|
||||
' \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends $buildDeps \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -fSL -o ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
\
|
||||
&& wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
|
||||
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
|
||||
\
|
||||
&& mkdir -p /usr/src/ruby \
|
||||
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
|
||||
&& rm ruby.tar.gz \
|
||||
\
|
||||
&& cd /usr/src/ruby \
|
||||
&& { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \
|
||||
\
|
||||
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
|
||||
# warning: Insecure world writable dir
|
||||
&& { \
|
||||
echo '#define ENABLE_PATH_CHECK 0'; \
|
||||
echo; \
|
||||
cat file.c; \
|
||||
} > file.c.new \
|
||||
&& mv file.c.new file.c \
|
||||
\
|
||||
&& autoconf \
|
||||
&& ./configure --disable-install-doc \
|
||||
&& make -j"$(nproc)" \
|
||||
&& make install \
|
||||
\
|
||||
&& apt-get purge -y --auto-remove $buildDeps \
|
||||
&& gem update --system $RUBYGEMS_VERSION \
|
||||
&& rm -r /usr/src/ruby
|
||||
&& cd / \
|
||||
&& rm -r /usr/src/ruby \
|
||||
\
|
||||
&& gem update --system "$RUBYGEMS_VERSION"
|
||||
|
||||
ENV BUNDLER_VERSION 1.13.1
|
||||
|
||||
|
|
Loading…
Reference in a new issue