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?
How can I run as root on Heroku?
Asked Answered
Are you trying to run it over CLI? –
Rella
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.
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.