summaryrefslogtreecommitdiffstats
path: root/adei-debug
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-04-15 02:22:56 +0200
committerSuren A. Chilingaryan <csa@suren.me>2018-04-15 02:22:56 +0200
commit5afaa946ebaada3e38e227827621db3319e818e7 (patch)
tree99df899b5a216d0f78bb108676c8927c12b67f55 /adei-debug
parent478ec305800eaa11a8a9de5d467598bdb59edc55 (diff)
downloadadei-5afaa946ebaada3e38e227827621db3319e818e7.tar.gz
adei-5afaa946ebaada3e38e227827621db3319e818e7.tar.bz2
adei-5afaa946ebaada3e38e227827621db3319e818e7.tar.xz
adei-5afaa946ebaada3e38e227827621db3319e818e7.zip
Add administration/debugging container with additional packages
Diffstat (limited to 'adei-debug')
-rw-r--r--adei-debug/Dockerfile5
-rw-r--r--adei-debug/Makefile47
2 files changed, 52 insertions, 0 deletions
diff --git a/adei-debug/Dockerfile b/adei-debug/Dockerfile
new file mode 100644
index 0000000..4dbae7e
--- /dev/null
+++ b/adei-debug/Dockerfile
@@ -0,0 +1,5 @@
+FROM chsa/adei:latest
+MAINTAINER Suren A. Chilingaryan <csa@suren.me>
+
+RUN zypper --gpg-auto-import-keys ref -s && \
+ zypper -n in strace ltrace gdb
diff --git a/adei-debug/Makefile b/adei-debug/Makefile
new file mode 100644
index 0000000..c851317
--- /dev/null
+++ b/adei-debug/Makefile
@@ -0,0 +1,47 @@
+all: build
+install: push
+
+.PHONY: rebuild build push start stop restart bash
+
+build: Dockerfile
+ docker build --tag chsa/adei-debug:latest .
+
+rebuild: Dockerfile
+ docker build --no-cache --tag chsa/adei-debug:latest .
+
+push: build
+ docker push chsa/adei-debug:latest
+
+start: build
+ @if [ `docker ps | grep adei-mysql | wc -l` -eq 0 ]; then \
+ if [ `docker ps -a | grep adei-mysql | wc -l` -eq 0 ]; then \
+ docker run --name adei-mysql -p 53306:3306/tcp -e MYSQL_ROOT_PASSWORD="adei" -e MYSQL_DATABASE="adei" -e MYSQL_USER="adei" -e MYSQL_PASSWORD="adei" -d mysql:5.7 ;\
+ else \
+ docker start adei-mysql ;\
+ fi ;\
+ fi ;\
+ if [ `docker ps | grep chsa/adei | wc -l` -eq 0 ]; then \
+ if [ `docker ps -a | grep adei-debug | wc -l` -gt 0 ]; then \
+ echo "Removing the stalled copy..." ;\
+ docker rm adei-debug ;\
+ fi ;\
+ docker run -p 8000:80 --name adei-debug --link adei-mysql:adei-mysql -e ADEI_PORTS=8000 -t -d chsa/adei-debug:latest ;\
+ else \
+ echo "Already running..." ;\
+ fi
+
+stop:
+ @if [ `docker ps | grep adei-debug | wc -l` -gt 0 ]; then \
+ docker stop adei-debug ;\
+ docker rm adei-debug ;\
+ fi
+
+stop_mysql: stop
+ docker stop adei-mysql
+
+restart:
+ make stop
+ make start
+
+bash: build
+ docker exec -it adei-debug /bin/bash