chore!: deprecate homebrew, remove ruby install
Homebrew is deprecated and will be removed at the end of March 2023. Homebrew reinstalls the bundled ruby if it's unavailable, so this helps us save space in the short term until Homebrew is removed.
This commit is contained in:
parent
e6f03c8b73
commit
214fa19aed
|
@ -52,4 +52,13 @@ USER coder
|
|||
|
||||
# install Homebrew, must be as a non-root user
|
||||
RUN HOMEBREW_INSTALL_FROM_API=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
ENV PATH /home/linuxbrew/.linuxbrew/bin:${PATH}
|
||||
|
||||
USER ROOT
|
||||
|
||||
# install our deprecation message wrapper for homebrew
|
||||
COPY --chown=root:root --chmod=755 homebrew-wrapper.sh /usr/local/bin/brew
|
||||
# remove the bundled ruby from homebrew to save space, homebrew reinstalls
|
||||
# anyways
|
||||
RUN rm -rf /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby
|
||||
|
||||
USER CODER
|
||||
|
|
|
@ -60,4 +60,13 @@ USER coder
|
|||
|
||||
# install Homebrew, must be as a non-root user
|
||||
RUN HOMEBREW_INSTALL_FROM_API=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
ENV PATH /home/linuxbrew/.linuxbrew/bin:${PATH}
|
||||
|
||||
USER ROOT
|
||||
|
||||
# install our deprecation message wrapper for homebrew
|
||||
COPY --chown=root:root --chmod=755 homebrew-wrapper.sh /usr/local/bin/brew
|
||||
# remove the bundled ruby from homebrew to save space, homebrew reinstalls
|
||||
# anyways
|
||||
RUN rm -rf /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby
|
||||
|
||||
USER CODER
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
brew_bin="/home/linuxbrew/.linuxbrew/bin/brew"
|
||||
prefix="WARNING: "
|
||||
if [ -t 1 ]; then
|
||||
# If stdout is a terminal, use color.
|
||||
prefix="\033[1;33m${prefix}\033[0m"
|
||||
fi
|
||||
|
||||
warning() {
|
||||
echo "${prefix}Homebrew in Coder images is deprecated and will be removed at the end of March 2023." 1>&2
|
||||
}
|
||||
|
||||
warning
|
||||
echo
|
||||
"$brew_bin" "$@"
|
||||
echo
|
||||
warning
|
Loading…
Reference in New Issue