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.

Docker: Git for deployment

318 pointsby itsderek23over 11 years ago

18 comments

mitchellhover 11 years ago
Disclaimer: Vagrant creator&#x2F;maintainer guy.<p>It is unfortunate that so many people compare Vagrant and Docker. While there is overlap, Docker is mostly not viable as a dev environment tool alone, so it isn&#x27;t a fair comparison. The main reason is because you have to be using Linux (and a recent Linux) as your main dev system, and in practice this is very rare. Move beyond indie developers and for all intents and purposes Linux desktops are non-existent (Vagrant is in use by companies like BBC, Expedia, Intuit, etc. and I can tell you most devs don&#x27;t know how to use Linux let alone run it as their primary dev platform).<p>BUT, I agree that putting your dev environment in a Docker container is absolutely _amazing_, and there is a KILLER Vagrant&#x2F;Docker combo.<p>The killer combo is actually running Vagrant to spin up Docker-ready VMs, then using Docker inside that to develop. This lets people use Docker on Windows, Mac, and Linux. You get the fast iteration time because all your state is actually in a container, so you just docker kill and run as usual.<p>In fact, an upcoming version of Vagrant is adding Docker as a provisioner, so you can `docker pull` containers down as part of `vagrant up`.<p>And I published Packer[1] templates to build Docker-ready VirtualBox&#x2F;VMware&#x2F;AWS images that are Vagrant-ready: <a href="https://github.com/mitchellh/packer-ubuntu-12.04-docker" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mitchellh&#x2F;packer-ubuntu-12.04-docker</a><p>[1]: www.packer.io
评论 #6291581 未加载
评论 #6292622 未加载
评论 #6291622 未加载
评论 #6291577 未加载
评论 #6291692 未加载
评论 #6291849 未加载
评论 #6292090 未加载
评论 #6295201 未加载
评论 #6293426 未加载
评论 #6293839 未加载
评论 #6291888 未加载
peterwwillisover 11 years ago
I don&#x27;t see the parallels to Git at all. If you just looked at the command line options without understanding what&#x27;s going on at all it might look similar.<p>&gt; a tool like Puppet or Chef is needed when you have long-running VMs that could become inconsistent over time.<p>Uh, no, Puppet and Chef are designed for configuration management. To manage your configs. They are not designed to replace customization and they don&#x27;t address package management or service maintenance. (They have options to munge these things, but you still need a human to make them useful and coordinate changes with your environment) Neither does Docker. Docker also doesn&#x27;t do configuration management. All different things.<p>&gt; You&#x27;ll be 100% sure what runs locally will run on production.<p>Incorrect; you&#x27;re using unions to fill in the missing dependency gaps, so there&#x27;s no guarantee what was on your testing container&#x27;s host is on your production container&#x27;s host. Your devs also might be running with container A and B, but in production you&#x27;re using containers A and C. Not to mention the kernels may be different, providing different functionality. All this assuming A, B and C don&#x27;t need instances of different configuration. There are no guarantees.<p>You know what else is crazy fast and easy to manage? Packages. There&#x27;s this new idea where you can have an operating system, run the command &#x27;apt-get install foobar&#x27;, and BAM all of a sudden foobar is installed. If you need a dependency, it just installs it. And it only downloads what it needs. Also does rollback, transactions, auditing, is multi-platform, extensible, does pre-and-post configuration, etc. Sound a lot like docker? That&#x27;s because it&#x27;s a simpler and more effective version of docker [without running everything as a virtualized service].<p>Deploy using your package manager. Except for slotted services which (AFAIK) no open-source package manager supports, it will do everything you need. And what it doesn&#x27;t do, you can hack in.
评论 #6293094 未加载
评论 #6292541 未加载
评论 #6292463 未加载
评论 #6291687 未加载
评论 #6291848 未加载
评论 #6293433 未加载
评论 #6292162 未加载
seldoover 11 years ago
I&#x27;m very excited about Docker[1] as both a development environment and deployment solution. However, from my early experiments, it seems there&#x27;s an important difference between LXC (which is what Docker manages for you) and a full VM, namely that the model revolves around running one process at a time: you can install mySQL on your docker image, but once it&#x27;s up, it&#x27;s running mySQL -- you can&#x27;t then ssh into it as you would a VM to poke around, modify config files, etc..<p>There are trivial ways to solve this, obviously. You can stop the image, restart it running bash, use <i>that</i> to modify config files, and then restart it again. But it requires a change of mindset: these things are much more than background processes, but they are less than a full VM. As the piece mentions, configuration management for newly-started images seems to be a missing piece of the puzzle right now, and debugging running Docker images can be... strange. [2] Not necessarily difficult, but different from what you&#x27;re used to, and learning curves are barriers to adoption.<p>As this tech matures I think these things will be quickly solved, and I&#x27;m looking forward to the results.<p>[1] Plus Virtualbox, started by Vagrant. See mitchellh&#x27;s comment.<p>[2] Unless, of course, I&#x27;m missing something. Docker-people: how do <i>you</i> configure vanilla server images to work in your environment?
评论 #6291758 未加载
评论 #6291977 未加载
BHSPitMonkeyover 11 years ago
I spent the entire article wondering how deployment via git was at all relevant, until I read the very last heading.<p>(The title is supposed to be read as &quot;Docker is as powerful for deployment as git is powerful for SCM!&quot;. There is no mention of git-based deployment strategies like Heroku&#x27;s.)
patrickaljordover 11 years ago
If you&#x27;re around Paris, we&#x27;re doing a Docker meetup in October <a href="http://www.meetup.com/Docker-Paris/events/136924002/" rel="nofollow">http:&#x2F;&#x2F;www.meetup.com&#x2F;Docker-Paris&#x2F;events&#x2F;136924002&#x2F;</a>
bryanlarsenover 11 years ago
Did you look at vagrant-lxc? If you already have a vagrant setup it&#x27;s very easy to switch to and works very well.
txutxuover 11 years ago
Hello,<p>Is there any way to run this on a recommendable way with other platforms than ubuntu?<p>I could love to see it running smoothly with debian and centos to turn immediately into a converted user.<p>Nice work, looks impressive.
评论 #6292055 未加载
passfreeover 11 years ago
I am still not sure how useful Docker is but we have created a simple example how to run Docker on Vortex which is sort of Vagrant alternative. <a href="https://github.com/websecurify/node-vortex/tree/master/doc/examples/docker-helloworld" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;websecurify&#x2F;node-vortex&#x2F;tree&#x2F;master&#x2F;doc&#x2F;e...</a>
based2over 11 years ago
Another one in progress:<p><a href="https://github.com/arnoo/git-deliver" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;arnoo&#x2F;git-deliver</a><p><a href="http://i.reddit.com/r/programming/comments/1j9n8v/gitdeliver_better_software_deployment_with_git/" rel="nofollow">http:&#x2F;&#x2F;i.reddit.com&#x2F;r&#x2F;programming&#x2F;comments&#x2F;1j9n8v&#x2F;gitdeliver...</a>
ivorasover 11 years ago
OS containers can be very cool. Want to see 1000 instances started on a small machine? <a href="http://ivoras.sharanet.org/blog/tree/2009-10-20.the-night-of-1000-jails.html" rel="nofollow">http:&#x2F;&#x2F;ivoras.sharanet.org&#x2F;blog&#x2F;tree&#x2F;2009-10-20.the-night-of...</a>
gtaniover 11 years ago
<a href="https://news.ycombinator.com/item?id=6252182" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=6252182</a><p>(i would give credibility to the docker maintainer)
j_sover 11 years ago
Get back in touch with me when Docker can help with Windows deployments. (Is there an issue I can &#x27;star&#x27; or otherwise track?)<p>Edit: To say Docker is analogous to Git for deployment fails outside of the Linux server realm (lxc). I&#x27;m trying to think of an OS-specific source control system to fix the analogy but can&#x27;t come up with anything only-Linux... &#x27;TFS for deployment&#x27;? :)<p>I plan to check out <a href="http://ulteo.com/home/en/download/sourcecode" rel="nofollow">http:&#x2F;&#x2F;ulteo.com&#x2F;home&#x2F;en&#x2F;download&#x2F;sourcecode</a> as an alternative.
评论 #6291723 未加载
评论 #6291790 未加载
评论 #6294266 未加载
herpyover 11 years ago
The title should read: &quot;Docker <i>is</i> Git for deployment&quot;<p>Currently, it implies that Docker is <i>using</i> Git for deployment.
megaman821over 11 years ago
How does Docker mesh with something like continuous deployment? How many layers until the AUFS falls down?
评论 #6293244 未加载
amjithover 11 years ago
I don&#x27;t think there is a way to rollback an image to the previous commit. Is there?
评论 #6291978 未加载
cynusxover 11 years ago
docker is pretty awesome, at my company we share auxilary server around with docker (message queue system) and it&#x27;s pretty RAD. I can&#x27;t wait until they made it rock-solid enough to run systems in production with it.
coherentponyover 11 years ago
Would it be possible to deploy an email server inside a docker container?
评论 #6292497 未加载
infocollectorover 11 years ago
My top wishlist for docker: Native windows support.
评论 #6294411 未加载
评论 #6292220 未加载
评论 #6296867 未加载