We could use Docker volumes — this is one possible option.
Docker Pattern: The Build Container
Alexei Ledenev

Although simpler, one case where using docker volume is not a viable solution is when working with remote Docker daemon.

Using docker cp is more verbose, but works in most situation.

Show your support

Clapping shows how much you appreciated Akhyar A.’s story.