vscode-dev-containers icon indicating copy to clipboard operation
vscode-dev-containers copied to clipboard

Make sure to run Homebrew as a non-root user only

Open andreiborisov opened this issue 3 years ago • 5 comments

Fixes: https://github.com/microsoft/vscode-dev-containers/issues/1490

andreiborisov avatar Jun 15 '22 11:06 andreiborisov

Thanks @andreiborisov!

@joshspicer it looks like some tests didn't pass this PR - is that a concern?

bamurtaugh avatar Jun 27 '22 17:06 bamurtaugh

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 
------

joshspicer avatar Jun 27 '22 17:06 joshspicer

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.

andreiborisov avatar Jun 27 '22 18:06 andreiborisov

Thanks, @andreiborisov!

joshspicer avatar Jun 27 '22 18:06 joshspicer

Any update on the timeline?

Michaelvsk avatar Aug 30 '22 12:08 Michaelvsk

@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

andreiborisov avatar Nov 04 '22 20:11 andreiborisov