vscode-dev-containers
vscode-dev-containers copied to clipboard
Make sure to run Homebrew as a non-root user only
Fixes: https://github.com/microsoft/vscode-dev-containers/issues/1490
Thanks @andreiborisov!
@joshspicer it looks like some tests didn't pass this PR - is that a concern?
The regression tests (https://github.com/microsoft/vscode-dev-containers/runs/6983363269?check_suite_focus=true#step:4:22966) seem to be complaining about missing ruby, as well as a permissions issue
> [stage-0 3/3] RUN --mount=target=/script-library,source=.,type=bind,rw bash /script-library/test/regression/run-scripts.sh /script-library false bort true false false:
cannot create directory ‘/home/bort/linuxbrew/Homebrew/var’: Permission denied
#9 532.5 Error: Can't create vendor-install-ruby lock in /home/bort/linuxbrew/Homebrew/var/homebrew/locks!
#9 532.5 Fix permissions by running:
#9 532.5 sudo chown -R $(whoami) /home/bort/linuxbrew/Homebrew/var/homebrew
#9 532.5 Error: Failed to install Homebrew Portable Ruby and cannot find another Ruby 2.6.8!
#9 532.5 If there's no Homebrew Portable Ruby available for your processor:
#9 532.5 - install Ruby 2.6.8 with your system package manager (or rbenv/ruby-build)
#9 532.5 - make it first in your PATH
#9 532.5 - try again
#9 532.5
------
I need to look into this again, it seems like there is an issue upstream that needs to be fixed first. I'm converting this to draft for now.
Thanks, @andreiborisov!
Any update on the timeline?
@Michaelvsk we migrated Homebrew installation script on the Devcontainer Features spec. Please, use the new feature: https://github.com/meaningful-ooo/devcontainer-features/tree/main/src/homebrew