vscode-dev-containers
vscode-dev-containers copied to clipboard
Python + Homebrew, returning "Error: Running Homebrew as root is extremely ..."
- VSCode Version: 1.67.2
- Local OS Version: Ubuntu 22.04 LTS
- Local chip architecture: x86-64
- Reproduces in: Remote - Containers
- Name of Dev Container Definition with Issue: "Python 3"
Steps to Reproduce:
Good morning my friends
About: Python + Homebrew, returning error "Error: Running Homebrew as root is extremely ..."
I have just created a development environment using python + homebrew and the following error is returned
Installing Homebrew...
Cloning into '/home/linuxbrew/.linuxbrew/Homebrew'...
Cloning into '/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core'...
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
The command '/bin/sh -c cd /tmp/build-features/local-cache && chmod +x ./install.sh && ./install.sh' returned a non-zero code: 1
[395831 ms] Error: Command failed: docker build -t vsc-python-labs-55ab636a2bbdda6b755a2f7493ddd6d9-features --build-arg BASE_IMAGE=vsc-python-labs-55ab636a2bbdda6b755a2f7493ddd6d9 --build-arg IMAGE_USER=root /tmp/vsch/container-features/0.234.0-1654274760079
[395832 ms] at IR (/home/marcio/.vscode/extensions/ms-vscode-remote.remote-containers-0.234.0/dist/spec-node/devContainersSpecCLI.js:221:995)
[395832 ms] at zy (/home/marcio/.vscode/extensions/ms-vscode-remote.remote-containers-0.234.0/dist/spec-node/devContainersSpecCLI.js:221:933)
[395832 ms] at processTicksAndRejections (node:internal/process/task_queues:96:5)
[395833 ms] at async $R (/home/marcio/.vscode/extensions/ms-vscode-remote.remote-containers-0.234.0/dist/spec-node/devContainersSpecCLI.js:226:2007)
[395833 ms] at async Zy (/home/marcio/.vscode/extensions/ms-vscode-remote.remote-containers-0.234.0/dist/spec-node/devContainersSpecCLI.js:226:3112)
[395833 ms] at async BR (/home/marcio/.vscode/extensions/ms-vscode-remote.remote-containers-0.234.0/dist/spec-node/devContainersSpecCLI.js:226:12448)
[395833 ms] at async qR (/home/marcio/.vscode/extensions/ms-vscode-remote.remote-containers-0.234.0/dist/spec-node/devContainersSpecCLI.js:226:12204)
[395839 ms] Exit code 1
[395847 ms] Command failed: /snap/code/97/usr/share/code/code /home/marcio/.vscode/extensions/ms-vscode-remote.remote-containers-0.234.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /home/marcio/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-data-folder .vscode-server/data/Machine --container-system-data-folder /var/vscode-server --workspace-folder /home/marcio/dados/acid-workflow/python-labs --workspace-mount-consistency cached --id-label vsch.local.folder=/home/marcio/dados/acid-workflow/python-labs --id-label vsch.quality=stable --log-level debug --log-format json --config /home/marcio/dados/acid-workflow/python-labs/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[395847 ms] Exit code 1
https://drive.google.com/file/d/1baICa18rTRnGWEHhK6LLIr9A3G2mp5oW/view?usp=sharing
https://drive.google.com/file/d/1EcMuo8kIlRhYiEHwiGLAsCfv5nKYcLwi/view?usp=sharing
If I create the development environment without selecting the use of homebrew, the Docker environment is assembled as expected
Thanks in advance to everyone who can contribute.
cc @andreiborisov
Hm, seems like this should be run by a non-root user now: https://github.com/microsoft/vscode-dev-containers/blob/852567db3f71bcbabca2881a50f8aa1c33df8eb6/script-library/homebrew-debian.sh#L130
I will fix this in a couple of days, thank you for raising the issue @mozgbrasil.
Asking to close this as we migrated the Homebrew installation script on the Devcontainer Features spec. Please, use the new feature: https://github.com/meaningful-ooo/devcontainer-features/tree/main/src/homebrew and reopen the issue, if it still persists.
Thanks @andreiborisov! Closing this issue.