Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I run as root on Heroku?

I tried using sudo to run a command on Heroku. Then I get a message that I cannot use the sudo command on Heroku. My real question is: How can I run a command with root privilege on Heroku, because it is required for some of the commands I'm trying to run?

like image 267
Ajibade Dapo Hammed Avatar asked Jul 29 '17 04:07

Ajibade Dapo Hammed


1 Answers

You cannot run as root on a Heroku Dyno, as Dynos are effectively containers, isolated from the host system. However, you should be able to install most packages via Buildpacks, either via first party supported buildpacks, thirdparty buildpacks, or via heroku-buildpack-apt. Attempting to alter any system files, will likely either not work, or will have unintended consequences.

like image 183
maniacalrobot Avatar answered Oct 16 '22 17:10

maniacalrobot