Docker: Start Container as Root User
When sudo
is not available in container,
you can jump into a running container as root
user using one of these commands:
docker exec -u root -t -i container_id /bin/bash
docker-compose run -u root --service-ports service_name exec bash
Leave a comment