Root password inside a Docker container

I'm using a Docker image which was built using the USER command to use a non-root user called dev. Inside a container, I'm "dev", but I want to edit the /etc/hosts file. So I need to be root. I'm ...