summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile21
-rw-r--r--README.md20
2 files changed, 39 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..240105e
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,21 @@
+FROM tianon/gentoo-stage3
+
+RUN touch /etc/init.d/functions.sh && \
+ echo 'PYTHON_TARGETS="${PYTHON_TARGETS} python2_7"' >> /etc/portage/make.conf && \
+ echo 'PYTHON_SINGLE_TARGET="python2_7"' >> /etc/portage/make.conf
+
+RUN \
+ emerge --sync && \
+ emerge gcc distcc && \
+ rm -rf /usr/portage/*
+
+RUN ( \
+ echo "#!/bin/sh" && \
+ echo "eval \"\`gcc-config -E\`\"" && \
+ echo "exec distccd \"\$@\"" \
+ ) > /usr/local/sbin/distccd-launcher && \
+ chmod +x /usr/local/sbin/distccd-launcher
+
+CMD ["/usr/local/sbin/distccd-launcher", "--allow", "0.0.0.0/0", "--user", "distcc", "--log-level", "notice", "--log-stderr", "--no-detach"]
+
+EXPOSE 3632
diff --git a/README.md b/README.md
index c5e1c79..638a8cb 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,20 @@
-docker-gentoo-distccd
-=====================
+# dockerfile-gentoo-distccd
Dockerfile for distccd server on gentoo
+
+## Setup
+
+ docker run -d -P --name distccd matsuu/gentoo-distccd
+ docker port distccd 3632
+ 0.0.0.0:49153
+
+## Howto
+
+ export DISTCC_HOSTS="server:49153,lzo,cpp"
+ pump make CC=distcc -j4
+
+## References
+
+- [distcc: a fast, free distributed C/C++ compiler](https://code.google.com/p/distcc/)
+- [Gentoo Linux](https://www.gentoo.org/)
+- [Distcc - Gentoo Wiki](http://wiki.gentoo.org/wiki/Distcc)