Looping through output of docker bash command

I am trying to loop through a docker bash command like this:
sudo docker exec -it my-container bash -c "cd sites && ls" > output.txt
which gives me expected output, when I loop through it as: cat output.txt | while read line do echo "abcd${line}def"; done
it gives me output as:

defdfile1
defdfile2

in short it is overlapping after file name
If I do all this without the docker command like only ls on my host it works fine, how to resolve this issue?

Source: StackOverflow