How can I run as root on Heroku?
Asked Answered
U

1

13

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?

Undertrump answered 29/7, 2017 at 4:49 Comment(1)
Are you trying to run it over CLI?Rella
S
9

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.

Selfindulgent answered 31/7, 2017 at 16:41 Comment(1)
I understand that build packs are to be used to install packages in heroku. I used the heroku-buildpack-apt to install a .deb package. Now how do I install it?Korry

© 2022 - 2024 — McMap. All rights reserved.