搞错了Docker环境

我有一点搞砸了Docker环境。 让我从头开始,我已经安装了全新的Ubuntu 12.04硬件盒,专门用于运行GitLab。

现在,由于它具有相当好的CPU和大量的可用内存,我考虑安装Docker,并设立一个Discourse论坛来取代我目前的Vanilla论坛。 我开始,只是做了一个aptitude install docker.io并从Ubuntu PPA中提取了最新的Docker包。

然后我在看Docker安装文档,看到他们使用不同的方式来安装。 我想“好吧,最好用同样的方法来正确安装Docker”。 所以我刚刚用了wget -qO- https://get.docker.io/ | sh wget -qO- https://get.docker.io/ | sh ,但忘了先清除旧的安装。

但是,我继续进行话语安装,并对容器的自动启动有一些问题。 每当主机系统启动时,容器确实开始,但是它们的连通性有限。 例如:我不能重build图像,因为它显然不能解决github.com

 root@host /var/discourse # ./launcher rebuild app WARNING: No swap limit support Updating discourse docker Already up-to-date. Stopping old container 4ddf909d349592ee9620d7bfc36b8c602f1e924cf3c179a81faa0be5e753a74d Calculated ENV: -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=6 -e UNICORN_SIDEKIQS=1 -e RUBY_GC_MALLOC_LIMIT=40000000 -e RUBY_HEAP_MIN_SLOTS=800000 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e HOME=/root -e DISCOURSE_DEVELOPER_EMAILS=mail@domain.com -e DISCOURSE_HOSTNAME=forums.domain.com -e DISCOURSE_SMTP_ADDRESS=smtp.mandrillapp.com -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=info@domain.com -e DISCOURSE_SMTP_PASSWORD=password cd /pups && git pull && /pups/bin/pups --stdin fatal: unable to access 'https://github.com/SamSaffron/pups.git/': Could not resolve host: github.com d2510635bf60babe1dfa59d29a8ce78ec10477810e3c282b896101b34456003d FAILED TO BOOTSTRAP 

另一个问题是容器不能通过SMTP(mandrillapp.com)发送邮件。 所以我挖了一下,不知何故,只是重新启动service docker restart启动Docker的想法,并说:问题都没有了。 DNS工作以及邮件将再次成功发送。

所以基本上当主机重新启动,我必须service docker restart ,使docker工作正常。

我已经找了一些死的init脚本,但只有一个:

 root@host ~ # ls -alR /etc/init.d/ | grep docker -rwxr-xr-x 1 root root 3421 Aug 21 21:24 docker 

有人可以帮我吗?