Aha, thanks for the advice. I'll give that a try. -stephan
On Sun, Apr 16, 2017 at 7:16 AM, Bert JW Regeer <[email protected]> wrote: > I would recommend changing to pip install -e, however you could for example > create a base docker image that runs pip install -e, then have a second > docker image you use for serving that runs pserve. > > This way you do the install step once. > > Bert > >> On Apr 16, 2017, at 06:11, Stephan Ellis <[email protected]> wrote: >> >> Hi All, >> >> I've been using pyramid for a while, but only recently Docker for my >> projects. I really like the idea of using docker for packaging my >> apps for deployment, but I like the idea of development inside >> containers even better. >> >> I've been using docker-compose to compose my dev environment, for >> example containers for couchdb, redis and my pyramid app (created >> using the starter template). I can get it to link up those containers >> and everything works as expected, great! The only problem is that the >> procedure the starter template uses to install my app's package for >> development. Here's my Dockerfile: >> >> FROM python:3.4 >> WORKDIR /opt/testapp >> ADD . . >> RUN python setup.py develop >> ENV PYTHONUNBUFFERED=true >> EXPOSE 6543 >> CMD ["pserve", "--reload", "development.ini"] >> >> The problem is that every time I change anything in the project >> directory, the image will rerun setup.py, resulting in slow startup >> for obvious reasons. The only reason I would need to run that again >> was if I changed the list of required packages in the setup.py file. >> I have been struggling to find an elegant solution to this problem. >> >> Can anyone point me in the right direction? >> >> Thanks! >> -stephan >> >> -- >> You received this message because you are subscribed to the Google Groups >> "pylons-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pylons-discuss/CAHHSwfP%2B9-1KeU3vf61jbxybE1C%2BZPisN7Y2KZrP%3DmOvMp-Yjw%40mail.gmail.com. >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/pylons-discuss/9A2E482C-D602-49A9-BAF9-5A2608C1ACB9%400x58.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAHHSwfPbsGn1rB-zYRMx1CKMb%3DWdsCMAh%2Bxow3Zr8UDe%3Dx6aRg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
