How to copy file from docker container of remote server to local machine

How to copy file from docker container of remote server to local machine

Source: StackOverflow