Starting a Docker images and getting into container as root

When start a Docker image and it is running as a container, I am sent in as root. I do not want this. Just being sent it as a user would be fine.

Can I go in a user and if so how do I do it?


1 Like
docker exec -itu <user_you'd_like_to_get_in_as> <container_id> bash

I hope this helps :slight_smile:

1 Like

Yes, that works thanks.