Docker uses the host kernel. To get everything identical you need to use a VM anyways.
Some languages bundle all of their dependencies so you can be relatively sure they will run the same on prod. For others (Python, Ruby) that use many system libraries, containers may add value