From 076db03abf9ac12a057b784a3e0999180ca53543 Mon Sep 17 00:00:00 2001 From: startxfr Date: Sat, 6 Dec 2014 01:09:00 +0100 Subject: adding script for automating image generation and starting container for testing and benchmarks --- Applications/dockerhub_run.sh | 3 +++ Applications/local_build.sh | 3 +++ Applications/local_run.sh | 3 +++ Applications/phpmyadmin/Dockerfile | 6 +++--- Applications/phpmyadmin/config.inc.php | 13 ------------- Applications/phpmyadmin/config.php | 13 +++++++++++++ OS/Centos/README.md | 18 +++++++++--------- OS/dockerhub_run.sh | 3 +++ OS/local_build.sh | 3 +++ OS/local_run.sh | 3 +++ Services/dockerhub_run.sh | 9 +++++++++ Services/local_build.sh | 9 +++++++++ Services/local_run.sh | 9 +++++++++ dockerhub_run.sh | 4 ++++ local_build.sh | 4 ++++ local_run.sh | 4 ++++ 16 files changed, 82 insertions(+), 25 deletions(-) create mode 100755 Applications/dockerhub_run.sh create mode 100755 Applications/local_build.sh create mode 100755 Applications/local_run.sh delete mode 100644 Applications/phpmyadmin/config.inc.php create mode 100644 Applications/phpmyadmin/config.php create mode 100755 OS/dockerhub_run.sh create mode 100755 OS/local_build.sh create mode 100755 OS/local_run.sh create mode 100755 Services/dockerhub_run.sh create mode 100755 Services/local_build.sh create mode 100755 Services/local_run.sh create mode 100755 dockerhub_run.sh create mode 100755 local_build.sh create mode 100755 local_run.sh diff --git a/Applications/dockerhub_run.sh b/Applications/dockerhub_run.sh new file mode 100755 index 0000000..2c25afb --- /dev/null +++ b/Applications/dockerhub_run.sh @@ -0,0 +1,3 @@ +#!/bin/bash +docker run -d -p 84:80 --name="pma" startx/app-pma +docker run -d -p 86:80 --name="rockmongo" startx/app-rockmongo \ No newline at end of file diff --git a/Applications/local_build.sh b/Applications/local_build.sh new file mode 100755 index 0000000..975a33e --- /dev/null +++ b/Applications/local_build.sh @@ -0,0 +1,3 @@ +#!/bin/bash +docker build -t app-pma Applications/phpmyadmin/ +docker build -t app-rockmongo Applications/rockmongo/ \ No newline at end of file diff --git a/Applications/local_run.sh b/Applications/local_run.sh new file mode 100755 index 0000000..3ae7183 --- /dev/null +++ b/Applications/local_run.sh @@ -0,0 +1,3 @@ +#!/bin/bash +docker run -d -p 85:80 --name="lbpma" app-pma +docker run -d -p 87:80 --name="lbrockmongo" app-rockmongo \ No newline at end of file diff --git a/Applications/phpmyadmin/Dockerfile b/Applications/phpmyadmin/Dockerfile index e17dbef..d63c460 100644 --- a/Applications/phpmyadmin/Dockerfile +++ b/Applications/phpmyadmin/Dockerfile @@ -3,10 +3,10 @@ MAINTAINER Christophe LARUE RUN yum -y install phpMyAdmin \ && yum clean all -COPY config.inc.php /etc/phpMyAdmin/config.inc.php +COPY config.php /etc/phpMyAdmin/config.inc.php COPY test.php /var/www/html/test.php EXPOSE 80 EXPOSE 443 - -ENTRYPOINT ["/usr/sbin/apachectl", "-D FOREGROUND"] \ No newline at end of file +VOLUME ["/var/www/html", "/var/log/httpd"] +CMD ["/sx/httpd_run.sh"] \ No newline at end of file diff --git a/Applications/phpmyadmin/config.inc.php b/Applications/phpmyadmin/config.inc.php deleted file mode 100644 index 20e4276..0000000 --- a/Applications/phpmyadmin/config.inc.php +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/Applications/phpmyadmin/config.php b/Applications/phpmyadmin/config.php new file mode 100644 index 0000000..20e4276 --- /dev/null +++ b/Applications/phpmyadmin/config.php @@ -0,0 +1,13 @@ + diff --git a/OS/Centos/README.md b/OS/Centos/README.md index 02646e9..7145ef0 100644 --- a/OS/Centos/README.md +++ b/OS/Centos/README.md @@ -3,7 +3,7 @@ Fedora image builded with minimal and updated binaries ## Running from docker registry - docker run -it --name="fedora" startx/fedora + docker run -it --name="centos" startx/centos ## Build and run from local Dockerfile ### Building docker image @@ -15,22 +15,22 @@ Copy sources in your docker host Build the container - docker build -t fedora OS/Fedora/ + docker build -t centos OS/Centos/ ### Running local image - docker run -it --name="fedora" fedora bash + docker run -it --name="centos" centos bash ## Accessing server # Start interactive shell - docker run -it startx/fedora bash + docker run -it startx/centos bash # Start as a daemon - docker run -d startx/fedora bash - docker exec -it fedora /bin/bash + docker run -d startx/centos bash + docker exec -it centos /bin/bash ## Related Resources -* [Sources files](https://github.com/startxfr/docker-images/tree/master/Services/fedora) +* [Sources files](https://github.com/startxfr/docker-images/tree/master/Services/centos) * [Github STARTX profile](https://github.com/startxfr/docker-images) -* [Docker registry for this container](https://registry.hub.docker.com/u/startx/fedora/) -* [Docker registry for Fedora](https://registry.hub.docker.com/u/fedora/) \ No newline at end of file +* [Docker registry for this container](https://registry.hub.docker.com/u/startx/centos/) +* [Docker registry for Centos](https://registry.hub.docker.com/u/centos/) \ No newline at end of file diff --git a/OS/dockerhub_run.sh b/OS/dockerhub_run.sh new file mode 100755 index 0000000..2209c2f --- /dev/null +++ b/OS/dockerhub_run.sh @@ -0,0 +1,3 @@ +#!/bin/bash +docker run -d --name="fedora" startx/fedora /bin/bash +docker run -d --name="centos" startx/centos /bin/bash \ No newline at end of file diff --git a/OS/local_build.sh b/OS/local_build.sh new file mode 100755 index 0000000..9491a4d --- /dev/null +++ b/OS/local_build.sh @@ -0,0 +1,3 @@ +#!/bin/bash +docker build -t fedora OS/Fedora/ +docker build -t centos OS/Centos/ \ No newline at end of file diff --git a/OS/local_run.sh b/OS/local_run.sh new file mode 100755 index 0000000..4d3e435 --- /dev/null +++ b/OS/local_run.sh @@ -0,0 +1,3 @@ +#!/bin/bash +docker run -d --name="lbfedora" fedora /bin/bash +docker run -d --name="lbcentos" centos /bin/bash \ No newline at end of file diff --git a/Services/dockerhub_run.sh b/Services/dockerhub_run.sh new file mode 100755 index 0000000..18c47a2 --- /dev/null +++ b/Services/dockerhub_run.sh @@ -0,0 +1,9 @@ +#!/bin/bash +docker run -d -p 80:80 --name="apache" startx/sv-apache +docker run -d -p 3306:3306 --name="mariadb" startx/sv-mariadb +docker run -d -p 11211:11211 --name="memcache" startx/sv-memcache +docker run -d -p 27017:27017 --name="mongo" startx/sv-mongo +docker run -d -p 8000:8000 --name="nodejs" startx/sv-nodejs +docker run -d -p 82:80 --name="php" startx/sv-php +docker run -d -p 5432:5432 --name="postgres" startx/sv-postgres +docker run -d -p 22022:22 --name="ssh" startx/sv-ssh \ No newline at end of file diff --git a/Services/local_build.sh b/Services/local_build.sh new file mode 100755 index 0000000..47d1df6 --- /dev/null +++ b/Services/local_build.sh @@ -0,0 +1,9 @@ +#!/bin/bash +docker build -t sv-apache Services/apache/ +docker build -t sv-mariadb Services/mariadb/ +docker build -t sv-memcache Services/memcache/ +docker build -t sv-mongo Services/mongo/ +docker build -t sv-nodejs Services/nodejs/ +docker build -t sv-php Services/php/ +docker build -t sv-postgres Services/postgres/ +docker build -t sv-ssh Services/ssh/ \ No newline at end of file diff --git a/Services/local_run.sh b/Services/local_run.sh new file mode 100755 index 0000000..8c4a027 --- /dev/null +++ b/Services/local_run.sh @@ -0,0 +1,9 @@ +#!/bin/bash +docker run -d -p 81:80 --name="lbapache" sv-apache +docker run -d -p 3307:3306 --name="lbmariadb" sv-mariadb +docker run -d -p 11212:11211 --name="lbmemcache" sv-memcache +docker run -d -p 27018:27017 --name="lbmongo" sv-mongo +docker run -d -p 8001:8000 --name="lbnodejs" sv-nodejs +docker run -d -p 83:80 --name="lbphp" sv-php +docker run -d -p 5433:5432 --name="lbpostgres" sv-postgres +docker run -d -p 22023:22 --name="lbssh" sv-ssh \ No newline at end of file diff --git a/dockerhub_run.sh b/dockerhub_run.sh new file mode 100755 index 0000000..66f4b9d --- /dev/null +++ b/dockerhub_run.sh @@ -0,0 +1,4 @@ +#!/bin/bash +OS/dockerhub_run.sh +Services/dockerhub_run.sh +Applications/dockerhub_run.sh \ No newline at end of file diff --git a/local_build.sh b/local_build.sh new file mode 100755 index 0000000..1be05e3 --- /dev/null +++ b/local_build.sh @@ -0,0 +1,4 @@ +#!/bin/bash +OS/local_build.sh +Services/local_build.sh +Applications/local_build.sh \ No newline at end of file diff --git a/local_run.sh b/local_run.sh new file mode 100755 index 0000000..2da2d96 --- /dev/null +++ b/local_run.sh @@ -0,0 +1,4 @@ +#!/bin/bash +OS/local_run.sh +Services/local_run.sh +Applications/local_run.sh \ No newline at end of file -- cgit v1.2.3