Question for code deployment(pulling code when runtime)

I have a question about code deployment.

My team used to make a Docker image for sharing several applications.
For example, a Docker image only have dependencies for several applications, and when I run the container from that image, I do ‘git clone’ my code what I want to deploy from Github.

I have thought it’s not a proper way to use Docker. So I asked about it, and heard that “Yes, It’s not a good way to use Docker. And before that, google about ‘pulling code when runtime'”. But when I googled about it, there were not enough results.

Since my team used to deploy many applications by ‘git clone’ even when not using Docker, I really want to know why pulling code when runtime is bad.

“Why pulling code when runtime is bad?”

Source: StackOverflow