diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-09-02 21:06:35 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-09-02 21:06:35 +0200 |
commit | e09cde6bc49e9c10d604446bbb56401a34c58710 (patch) | |
tree | cc2644fd821b409b5e8972c490849e052484ae63 /Makefile | |
parent | ca74903c6c9e21ee2abe0201652f1ed22022099e (diff) | |
download | gentoo-distcc-e09cde6bc49e9c10d604446bbb56401a34c58710.tar.gz gentoo-distcc-e09cde6bc49e9c10d604446bbb56401a34c58710.tar.bz2 gentoo-distcc-e09cde6bc49e9c10d604446bbb56401a34c58710.tar.xz gentoo-distcc-e09cde6bc49e9c10d604446bbb56401a34c58710.zip |
Make it work with nowadays system
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 45 |
1 files changed, 45 insertions, 0 deletions
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 + |