TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Dockerizing a Python Web App

62 pointsby ccarpentergabout 11 years ago

4 comments

twelve40about 11 years ago
Can someone please explain what is the purpose of this. Why dockerize a python app vs. just running on a Linux instance. Also, do you get forever hooked on Amazon services in the process?
评论 #7752581 未加载
评论 #7752509 未加载
评论 #7753320 未加载
评论 #7753236 未加载
评论 #7752610 未加载
评论 #7753346 未加载
girvoabout 11 years ago
Hey, funny, I&#x27;ve spent the last two days doing something like this.<p>We have a large Laravel app that we&#x27;ve created, and want to run CI&#x2F;CD on it, along with acceptance tests (all in Strider CD). The thing is, it has some annoying outdated dependencies, and I need a way to spin up an actual instance of our app, with MySQL, Apache and everything else to be able to run Huxley and Selenium on it.<p>So, I turned to Docker! I&#x27;m nearly at a point where we can just do a `docker pull &lt;appname&gt;` and then run the commands we want to from there, but I&#x27;m not there yet. It&#x27;s really interesting, although the focus on &quot;single process that runs in the foreground&quot; stumps me a little. I&#x27;d love a way to running `httpd` and other services in the background, but still use `docker run &#x2F;var&#x2F;www&#x2F;vendor&#x2F;bin&#x2F;phpunit` -- anyone got any luck doing something similar?
评论 #7754751 未加载
jraddabout 11 years ago
Here is a real world example of a run command to set up MongoDB[<a href="http://docs.docker.io/examples/mongodb/" rel="nofollow">http:&#x2F;&#x2F;docs.docker.io&#x2F;examples&#x2F;mongodb&#x2F;</a>] with docker that shares a common db located on the host dir &quot;&#x2F;srv&#x2F;pool&#x2F;db&quot; in my scenario.<p><pre><code> MONGO_ID=$(sudo docker run -d -v &#x2F;srv&#x2F;pool&#x2F;db:&#x2F;srv&#x2F;data&#x2F;db:rw jradd&#x2F;mongodb) </code></pre> Same usage can apply to postgres, mysql, redis, etc…
arushsabout 11 years ago
im going to dockerize my python if you know what I mean