I was not allowed to install sudo in my container. For me the solution was enter the container terminal as root:
docker exec -u root -it <container name/id>