TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Getting Started with Docker

296 点作者 fideloper大约 11 年前
I saw that people were looking for better getting started docs for Docker, so I put together the post I wish I found on Docker when I was digging into it.

13 条评论

Xdes大约 11 年前
This skips over the hard part: managing docker containers. Poking a hole directly to the container is a leaky abstraction. A reverse proxy like HAProxy or Varnish should be sitting in front of the container.<p>Once you have the reverse proxy setup the next problem that arises is routing to containers based on the domain. Now your HAProxy or Varnish config is going to get bloated and every time you deploy a container the config needs to be modified and reloaded. By this time you might be looking at chef or puppet for automating the config generation.<p>Chef and puppet are not simple to learn. They have their own set of quirks (like unreliable tooling support on Windows). I&#x27;m in the process of conquering this, but I hope one day there will be a simpler way.
评论 #7442903 未加载
评论 #7442499 未加载
评论 #7442256 未加载
评论 #7442288 未加载
评论 #7442271 未加载
评论 #7443803 未加载
评论 #7442967 未加载
评论 #7442802 未加载
评论 #7466316 未加载
评论 #7442031 未加载
评论 #7443519 未加载
izietto大约 11 年前
For non-Paas use cases (for example, a development server with a bunch of projects) I find schroot (1) simpler and more productive. For example, you can use the normal `service stop &#x2F; service start` instead of writing manually init scripts, and you don&#x27;t get stuck with sharing directories, which I found extremely tricky with Docker (for example, I couldn&#x27;t start correctly mysql with supervisor sharing the mysql db directory). But Docker is in early development, so I think it will become easier in the future.<p>1: <a href="https://wiki.debian.org/Schroot" rel="nofollow">https:&#x2F;&#x2F;wiki.debian.org&#x2F;Schroot</a>
评论 #7442658 未加载
评论 #7442330 未加载
robszumski大约 11 年前
CoreOS experience designer here. I&#x27;m looking for testers to check out the general platform and test some of our new features. All skill levels are fine – new to docker &amp; CoreOS, new to CoreOS only, etc. I&#x27;m happy to work with your schedule and make it as quick or involved as you&#x27;re comfortable with. Anything from emailing a few thoughts to Skype to hanging out in our office in SF for the day.<p>Email: rob.szumski@coreos.com
markbnj大约 11 年前
I&#x27;ve been using docker for a couple of months, but we have only just begun experimenting with actual deployment in a test environment on ec2. Right now we use it primarily as configuration&#x2F;dependency management. We&#x27;re a small team and it seems to make setup easier, at least so far. Two examples: the first is a log sink container, in which we run redis + logstash. The container exposes the redis and es&#x2F;kibana ports, and the run command maps these to the host instance. Setting up a new log server means launching an instance, and then pulling and starting the container. The second example is elasticsearch. We have a container set up to have cluster and host data injected into it by the run command, so we pull the container, start it, and it joins the designated cluster. The thing I like about this is the declarative specification of the dependencies, and the ease of spinning up a new instance. As I say, just experimenting so far, and I don&#x27;t know how optimal all of this is yet, so would love any feedback.<p>One last quick thought on internal discovery. A method we&#x27;re playing with on ec2 is to use tags. On startup a container can use a python script and boto to pull the list of running instances within a region that have certain tags and tag values. So we can tag an instance as an es cluster member, for example, and our indexer script can find all the running es nodes and choose one to connect to. We can use other tags to specify exposed ports and other information. Again, just messing around and still not sure of the optimal approach for our small group, but these are some interesting possibilities.
tonyhb大约 11 年前
This is a copy and improvement of the article I wrote last month, even down to the breakdown of &quot;What&#x27;s that command doing?&quot; with `docker run -t -i ubuntu &#x2F;bin&#x2F;bash`.<p>Glad it was useful enough to spur an improved article, at least.<p><a href="http://tonyhb.com/unsuck-your-vagrant-developing-in-one-vm-with-vagrant-and-docker" rel="nofollow">http:&#x2F;&#x2F;tonyhb.com&#x2F;unsuck-your-vagrant-developing-in-one-vm-w...</a>
评论 #7442549 未加载
评论 #7442539 未加载
yblu大约 11 年前
Can someone tell me what&#x27;s the point of this? (I seriously love to know, not criticizing it.) Why would I need to have docker containers to install stuff on them instead of just installing stuff directly on host?<p>Let&#x27;s say I develop a new web app, I would install NodeJS, PostgreSQL and such on my machine. Before I deploy the app for the first time, I&#x27;ll install them in the necessary servers. Now, it looks like I would need to do the same, except adding the step of building Docker containers.<p>I think I must miss something important here because the number of GitHub stars for Docker is impressive and this is usually a good indication of the usefulness of the project.
评论 #7446174 未加载
评论 #7446137 未加载
njharman大约 11 年前
&gt; with Macintosh&#x27;s kernel<p>I misread that as &quot;Microsoft&#x27;s...&quot; and got excited since I run a build farm that&#x27;s 70% windows and wish I could use docker but it&#x27;s not worth having two systems (Container and VMs).<p>Also isn&#x27;t that complete wrong? Macintosh is not an OS or company. It was one of Apple&#x27;s product lines, long ago.
zobzu大约 11 年前
VM CAN share binaries&#x2F;libs&#x2F;etc (otherwise called files)<p>also, VMs CAN &quot;share&quot; memory. ie VMs can dedup memory between themselves. On Linux at least.<p>Not saying docker&#x2F;lxc and all things namespaces are bad at all - but setting things straight. VMs can do this:)<p>Checkout KSM for memory &quot;sharing&quot; and any overlay-style file system that is mounted by VMs (this one works exactly the same as when you use namespaces&#x2F;docker&#x2F;lxc in fact)
arianvanp大约 11 年前
Shouldn&#x27;t &quot;setting up a correct init process&quot; be part of every &quot;getting started with docker?&quot; <a href="http://phusion.github.io/baseimage-docker/" rel="nofollow">http:&#x2F;&#x2F;phusion.github.io&#x2F;baseimage-docker&#x2F;</a>
评论 #7444634 未加载
评论 #7446396 未加载
评论 #7443841 未加载
calgaryeng大约 11 年前
I wish that people would stop writing tutorials on &quot;getting started&quot; with Docker, and actually start writing up examples of how to work with multiple containers, hosts, and linking.<p>That&#x27;s the part that I (and I&#x27;m sure other beginners) get totally stuck on. Anyone can do docker commit&#x2F;pull.
评论 #7448831 未加载
评论 #7469015 未加载
评论 #7454071 未加载
评论 #7454025 未加载
netcraft大约 11 年前
this is the first time I have heard of coreOS - seems to be custom built for containers like docker. are there downsides to doing system updates this way and not having a package manager, just relying on containers for everything? Seems great in concept.
评论 #7442263 未加载
ilovecookies大约 11 年前
Well good morning hackers.. This has been around for ages...<p><a href="http://www.xenproject.org/" rel="nofollow">http:&#x2F;&#x2F;www.xenproject.org&#x2F;</a>
pg_fukd_mydog大约 11 年前
Would it be better to use FreeBSD and their Jails mechanism for all of this?
评论 #7448026 未加载
评论 #7442372 未加载
评论 #7442870 未加载