How to Move Code into a Docker Container
Too Long; Didn't Read
<a href="https://www.docker.com/" target="_blank">Docker</a> provides two good options for moving your code into an image or container: <a href="https://docs.docker.com/storage/bind-mounts/" target="_blank">bind mounts</a> and the <a href="https://docs.docker.com/engine/reference/builder/#copy" target="_blank">Dockerfile </a><code class="markup--code markup--p-code"><a href="https://docs.docker.com/engine/reference/builder/#copy" target="_blank">COPY</a></code><a href="https://docs.docker.com/engine/reference/builder/#copy" target="_blank"> instruction</a>. In this post, I'll explain why images should always use the <code class="markup--code markup--p-code">COPY</code> instruction in production, and why it may be more convenient to use bind mounts in development.