Docker and Nix are orthogonal; Docker is mostly a tool for packaging things in a standard way, Nix is a way of specifying build instructions.
But many people (ab)use Docker to solve the kinds of problems that Nix would have been better suited to solve.