From d1ecac6621cdb95ed412e7e04b6e27497ab3aff6 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 2 Mar 2014 15:13:38 -0800 Subject: [PATCH] hubot: Add a hubot image I had to instal Git to avoid a: GET https://registry.npmjs.org/scoped-http-client GET https://registry.npmjs.org/async ERR! not found: git npm ERR! ERR! Failed using git. This is most likely not a problem with npm itself. Please check if you have git installed and in your PATH. Linux 3.13.0 command "/usr/bin/node" "/usr/bin/npm" "install" cwd /hubot node -v v0.10.21 1.3.11 ENOGIT error during the 'npm install'. Other than that, this is fairly straightforward, although I wish that the script dependencies were handled automatically :p. Docker doesn't let you modify /etc/hosts at the moment [1]. If you need to add custom DNS (because your target IRC server doesn't resolve automatically), you can use dnsmasq [2]. I added something like this to the tail of my hubot/Dockerfile.template: RUN emerge -v dnsmasq RUN rc-update add dnsmasq default RUN echo 'address="/irc.example.net/192.168.0.2"' >> /etc/dnsmasq.conf RUN echo 'nameserver 192.168.0.1' >> /etc/resolv.dnsmasq.conf RUN echo 'resolv-file=/etc/resolv.dnsmasq.conf' >> /etc/dnsmasq.conf RUN echo 'listen-address=127.0.0.1' >> /etc/dnsmasq.conf RUN sed -i 's/need localmount net$/use localmount net/' /etc/init.d/dnsmasq And fired up the container with: docker run ... --dns 127.0.0.1 wking/hubot /bin/bash # rc default # cd hubot # REDISCLOUD_URL="${REDIS_PORT}" exec bin/hubot --name "${HUBOT_IRC_NICK:-hubot}" -a irc [1]: https://github.com/dotcloud/docker/issues/2267 [2]: https://github.com/dotcloud/docker/issues/1951#issuecomment-24960347 --- README.md | 1 + build.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 5030c60..77feb3d 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ The dependency graph is: |-- docker-registry (adds a Docker registry server) |-- gentoo-layman (adds layman for Gentoo overlays) | `-- package-cache (adds a package-cache proxy) + |-- hubot (adds hubot with an IRC adapter) |-- memcached (adds Memcached) |-- nginx (adds Nginx) | |-- nginx-proxy (SSL/TLS proxying via SNI) diff --git a/build.sh b/build.sh index b240fd1..3b249f1 100755 --- a/build.sh +++ b/build.sh @@ -50,6 +50,7 @@ REPOS="${REPOS:- buildbot docker-registry elasticsearch + hubot kibana kibana-azure memcached -- 2.26.2