summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile20
-rw-r--r--Makefile45
2 files changed, 57 insertions, 8 deletions
diff --git a/Dockerfile b/Dockerfile
index 240105e..a32229e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,13 +1,13 @@
-FROM tianon/gentoo-stage3
+FROM gentoo/stage3-amd64:20190829
-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 -1 portage
-RUN \
- emerge --sync && \
- emerge gcc distcc && \
- rm -rf /usr/portage/*
+#RUN touch /etc/init.d/functions.sh && \
+# echo 'PYTHON_TARGETS="${PYTHON_TARGETS} python3_6"' >> /etc/portage/make.conf && \
+# echo 'PYTHON_SINGLE_TARGET="python3_6"' >> /etc/portage/make.conf
+
+RUN emerge =gcc-8.3.0* distcc
RUN ( \
echo "#!/bin/sh" && \
@@ -16,6 +16,10 @@ RUN ( \
) > /usr/local/sbin/distccd-launcher && \
chmod +x /usr/local/sbin/distccd-launcher
+
+RUN rm -rf /usr/portage/*
+
+#CMD ["/usr/local/sbin/distccd-launcher", "--allow", "0.0.0.0/0", "--user", "distcc", "--log-level", "notice", "--log-stderr", "--no-detach", "--verbose"]
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/Makefile b/Makefile
new file mode 100644
index 0000000..ba48592
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,45 @@
+all: build
+install: push
+
+.PHONY: rebuild build push start stop restart bash logs
+
+build: Dockerfile
+ docker build --tag chsa/distcc:latest .
+
+rebuild: Dockerfile
+ docker build --no-cache --tag chsa/distcc:latest .
+
+push: build
+ docker push chsa/distcc:latest
+
+start: build
+ if [ `docker ps | grep chsa/distcc | wc -l` -eq 0 ]; then \
+ if [ `docker ps -a | grep distccd | wc -l` -gt 0 ]; then \
+ echo "Removing the stalled copy..." ;\
+ docker rm distccd ;\
+ fi ;\
+ docker run -p 0.0.0.0:3632:3632 --name distccd -t -d chsa/distcc:latest ;\
+ else \
+ echo "Already running..." ;\
+ fi
+
+stop:
+ @if [ `docker ps | grep distccd | wc -l` -gt 0 ]; then \
+ docker stop distccd ;\
+ docker rm distccd ;\
+ fi
+
+restart:
+ make stop
+ make start
+
+debug: build
+ docker rm distccd ;\
+ docker run -p 0.0.0.0:3632:3632 --name distccd -it chsa/distcc:latest /bin/bash
+
+bash: build
+ docker exec -it distccd /bin/bash
+
+logs:
+ docker logs distccd
+