Docker login container as root

Docker Exec Options
Docker exec command supports various options to modify the functionality of the commands. It supports the following functions.
- -i – This option keeps the STDIN.
- -t – Spawns a pseudo TTY
- -u – Specifies the username or UID.
- -w – Working directory
- -p – allocates extended privileges to the command.
- -d – runs in detached mode.
- -e – sets environment variables.
docker exec -itu 0 <container name/id> bash
or
docker exec -itu root <container name/id> bash
or
docker exec -itu root <container name/id> bash
Done
Category: Tekno