<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 21 January 2015 at 11:25, Giorgos Logiotatidis <span dir="ltr"><<a href="mailto:giorgos@mozilla.com" target="_blank">giorgos@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
Stuart Colville writes:<br>
<br>
> On 16 January 2015 at 22:59, Jared Kerim <<a href="mailto:jkerim@mozilla.com">jkerim@mozilla.com</a>> wrote:<br>
><br>
>> Is there a major reason that this build process can't be done at the<br>
>> docker level, capture a version of the container, push it to a docker repo<br>
>> (our own or dockerhub) and then have the AWS instance deploys just pull<br>
>> down the already built containers?<br>
>><br>
><br>
><br>
> The main reason this a problem on the marketplace container builds is that<br>
> if you're copying the deps file (requirements.txt / package.json) and then<br>
> building off of that - the ADD/COPY step will cache-bust the layer created<br>
> by installing the deps when the file changes. This means if one dep is<br>
> added the entire dep install process happens again because that layer needs<br>
> to be recreated.<br>
<br>
<br>
</span>For masterfirefoxos we use the same technique you do, i.e. ADD<br>
requirements.txt, pip install and then add the rest of the code [0]. As<br>
you say this takes advantage of docker caching, unless a requirements<br>
change and then you'll have to go through pip install again. But<br>
changing requirements.txt is not that common for us.<br>
<br>
Do you need to change requirements.txt / package.json often?<br></blockquote><div><br><br></div><div>Yes quite a bit. Enough for it to be annoying from the build perspective :). Also consuming modules seems to be on the increase in general as reusable code is moved out into modules.<br><br></div><div>Stuart.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Best,<br>
Giorgos<br>
<br>
[0]<br>
<a href="https://github.com/mozilla/masterfirefoxos/blob/master/Dockerfile#L4-L7" target="_blank">https://github.com/mozilla/masterfirefoxos/blob/master/Dockerfile#L4-L7</a><br>
</blockquote></div><br></div></div>