VirtualBox is a widely used virtualization solution that will give you exactly this, and if it’s important to you to be able to sudo or ssh into your runtime, that’s probably much closer to what you’re looking for.
It’s much more common to use Docker in a kind of batch mode, where you describe what goes into a container (in a Dockerfile, but using familiar commands like apt-get) and then run it non-interactively. This official Docker tutorial should hopefully give you a feel for it. Typical containers won’t have a working sudo, or any way to “log in” to the container from outside, and won’t be running heavy-weight init systems like systemd; usually they are running only a single process. (Run ps -ef on your host and look at everything that’s running; the nginx image I referenced above will be running only one process at all, nginx.)