How to download git only on docker?

want to install only git in the Linux container, but it wastes a lot of time due to too much “apt-get update” content. Is there any efficient way?

Source: StackOverflow