Created
June 6, 2023 21:17
-
-
Save YOU54F/3d39e8f397014e2d4d279f8cdd24ff0b to your computer and use it in GitHub Desktop.
LinuxBrew linux/arm64 - ruby:2.6.10-alpine - modified installer to find ruby on path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM --platform=linux/arm64 ruby:2.6.10-alpine | |
| RUN ruby --version && which ruby | |
| RUN apk add bash curl build-base git gcompat && \ | |
| rm -rf /var/lib/apt/lists | |
| # Install homebrew for aarch64 linux | |
| # Uses modified installer script to allow for aarch64 | |
| ENV PATH="/usr/local/bin:$PATH:/home/linuxbrew/.linuxbrew/bin" | |
| # 1. you54f/brew git remote allows successful path lookup on install so you can use a custom ruby version | |
| RUN HOMEBREW_BREW_GIT_REMOTE="https://github.com/you54f/brew" \ | |
| # 2. ./install.sh allows for linux-aarch64 | |
| NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/you54f/install/HEAD/install.sh)" | |
| # 3. set remote back to homebrew | |
| RUN git -C "/home/linuxbrew/.linuxbrew/Homebrew" remote set-url origin https://github.com/Homebrew/brew | |
| RUN brew --version | |
| RUN brew config | |
| RUN brew doctor || echo "expected brew doctor failre regarding unsupported hardware (arm64) " | |
| RUN brew upgrade | |
| ENTRYPOINT [ "brew" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment