This is a good question.
A cellular environment is not required as long as the specific enzymes DNA polymerases I & III, and primase are present, and the pH and temperatures are optimal. These enzymes will carry out the necessary synthesis of the primer , then add nucleotides to the primer and replace the primer with a DNA sequence.
However, the problem is that without a cellular environment , these enzymes will not exist . So unless you can somehow extract these enzymes, and replicate the exact conditions, such as optimum pH and temperatures in a cell, DNA replication cannot take place.
Don't forget you will need ribosomes, tRNA and other cellular metabolic machinery to continuously synthesize the required enzymes and these can only be found in a cell (unless you extract them as well).
That is why viruses are inactive and incapable of replicating their genomes when they are out of a cell as they require the necessary enzymes that are present only in a cell for replication for replication of their genomes (DNA or RNA).