How to run bash as user root on alpine images with docker? su: must be suid to work properly How to run bash as user root on alpine images with docker? su: must be suid to work properly docker docker

How to run bash as user root on alpine images with docker? su: must be suid to work properly


You can run a command within the container as root using --user root. To get a shell:

docker exec -it --user root kong sh


You must use $CONTAINER_ID :

docker exec -it --user root $CONTAINER_ID /bin/sh