Golang Mac OSX build for Docker machine
<p>I need to run Golang application on Docker machine.</p>

<p>I'm working on Mac OSX and Docker is working on top of Linux virtual machine, so binaries builded on Mac are not runnable on Docker. </p>

<p>I see two ways here:</p>

<ol>
<li>cross-compile binaries on Mac for linux OS</li>
<li>copy project sources to docker, run 'go get' and 'go build' on it</li>
</ol>

<p>First one is hard because of CGO (it is used in some imported libraries). </p>

<p>Second is very slow because of 'go get' operation.</p>

<p>Can you please tell me, which way is the most common in that situation? Or maybe I'm doing something wrong?</p>