Skip to content

Commit

Permalink
Revert "Dockerfile: bootstrap with Portable Ruby for aarch64 Linux"
Browse files Browse the repository at this point in the history
This is temporarily needed to unblock a new Portable Ruby build for
aarch64 Linux in ZhongRuoyu/homebrew-portable-ruby-aarch64-linux#14.

This reverts commit ec6b14e.
  • Loading branch information
ZhongRuoyu committed Oct 26, 2024
1 parent 65cb389 commit 25f2ebd
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ ARG version=22.04
# shellcheck disable=SC2154
FROM ubuntu:"${version}"
ARG DEBIAN_FRONTEND=noninteractive
ARG ruby_version=3.3.5
ARG portable_ruby_version=3.3.5

# We don't want to manually pin versions, happy to use whatever
# Ubuntu thinks is best.
Expand All @@ -27,6 +29,7 @@ RUN apt-get update \
git \
gpg \
less \
libreadline-dev \
locales \
make \
netbase \
Expand Down Expand Up @@ -57,8 +60,15 @@ ENV PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${PATH}
XDG_CACHE_HOME=/home/linuxbrew/.cache
WORKDIR /home/linuxbrew

RUN git clone https://github.com/Homebrew/brew.git .linuxbrew/Homebrew \
&& HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ZhongRuoyu/homebrew-portable-ruby-aarch64-linux/HEAD/bootstrap.sh)"
RUN git clone https://github.com/rbenv/rbenv.git .rbenv \
&& git clone https://github.com/rbenv/ruby-build.git .rbenv/plugins/ruby-build \
&& .rbenv/bin/rbenv install "${ruby_version}" \
&& git clone https://github.com/Homebrew/brew.git .linuxbrew/Homebrew \
&& mkdir -p .linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby \
&& ln -s "/home/linuxbrew/.rbenv/versions/${ruby_version}" ".linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/${portable_ruby_version}" \
&& ln -s "${portable_ruby_version}" .linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/current \
&& mkdir -p .linuxbrew/etc/homebrew \
&& echo 'HOMEBREW_FORCE_VENDOR_RUBY=1' >> .linuxbrew/etc/homebrew/brew.env

RUN mkdir -p \
.linuxbrew/bin \
Expand Down

0 comments on commit 25f2ebd

Please sign in to comment.