How to install Sudo inside a docker container in Linux?
Dung Do Tien Dec 10 2020 233
After SSH to the docker container in Ubuntu Linux, I run some commands to do something. For example as below:
sudo add-apt-repository main
But I got an error : bash: sudo: command not found.
I tried to install sudo by command below :
apt-get install sudo
But I got error: Unable to locate package sudo.
Please suggest to me How to install Sudo inside a docker container in Linux?
Have 1 answer(s) found.
- 1
I run the command below. It's worked for me.
apt-get update apt-get -y install sudo
Manish Kumar Dec 10 2020
If this answer is useful for you, please BY ME A COFFEE!!! I need your help to maintain blog.
* Type maximum 2000 characters.
* All comments have to wait approved before display.
* Please polite comment and respect questions and answers of others.