From b640252c198e11d4aa8b6cedff4989a103471153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= Date: Tue, 6 Jan 2015 04:34:50 +0100 Subject: [PATCH] =?UTF-8?q?dalsze=20prace,=20pgadmin=20container,=20pocz?= =?UTF-8?q?=C4=85tki=20openldap,=20pgadmin=20rozgrzebany?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- images/cron/Dockerfile | 2 +- images/pgadmin/Dockerfile | 14 +++ openldap/Dockerfile | 7 +- setup.sh | 13 +-- static_data/configs/pgadmin/config.inc.php | 123 +++++++++++++++++++++ static_data/data/php-fpm/pgadmin/index.php | 4 - 6 files changed, 149 insertions(+), 14 deletions(-) create mode 100644 images/pgadmin/Dockerfile create mode 100644 static_data/configs/pgadmin/config.inc.php delete mode 100644 static_data/data/php-fpm/pgadmin/index.php diff --git a/images/cron/Dockerfile b/images/cron/Dockerfile index 34b6ed6..e04cb4e 100644 --- a/images/cron/Dockerfile +++ b/images/cron/Dockerfile @@ -22,7 +22,7 @@ RUN DEBIAN_FRONTEND=noninteractive \ # finally, make sure that this sed script runs every few minutes on all /etc/cron.d files RUN rm -rf /etc/cron.*/* \ && sed -i -r -e 's/^(([/0-9*,-]+\s+){5}|@(reboot|yearly|annually|monthly|weekly|daily|midnight|hourly)\s+)root\s+(.*)/\1\tnobody\t\4/' /etc/crontab \ - && echo "*/15 * * * * root sed -i -r -e 's/^(([/0-9*,-]+\s+){5}|@(reboot|yearly|annually|monthly|weekly|daily|midnight|hourly)\s+)root\s+(.*)/\1\tnobody\t\4/' /etc/cron.d/*" >> /etc/crontab + && echo "*/15 * * * * root sed -i -r -e 's/^(([/0-9*,-]+\s+){5}|@(reboot|yearly|annually|monthly|weekly|daily|midnight|hourly)\s+)root\s+(.*)/\\1\\tnobody\\t\\4/' /etc/cron.d/*" >> /etc/crontab # cron volumes VOLUME ["/etc/cron.d", "/etc/cron.daily", "/etc/cron.hourly", "/etc/cron.monthly", "/etc/cron.weekly"] diff --git a/images/pgadmin/Dockerfile b/images/pgadmin/Dockerfile new file mode 100644 index 0000000..083b1ba --- /dev/null +++ b/images/pgadmin/Dockerfile @@ -0,0 +1,14 @@ +FROM plug/php-fpm +MAINTAINER Michał "rysiek" Woźniak + +ENV APP_NAME "pgadmin" +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends git \ + && git clone -b REL_5-1 --single-branch https://github.com/phppgadmin/phppgadmin.git /opt/php/pgadmin \ + && rm -rf /opt/php/pgadmin/.git \ + && chown -R www-data:www-data /opt/php/pgadmin \ + && apt-get purge -y git \ + && apt-get autoremove -y + +VOLUME ["/opt/php/pgadmin/conf"] \ No newline at end of file diff --git a/openldap/Dockerfile b/openldap/Dockerfile index ea234d0..8e422f6 100644 --- a/openldap/Dockerfile +++ b/openldap/Dockerfile @@ -1,8 +1,11 @@ FROM debian:jessie MAINTAINER Michal "rysiek" Woźniak -RUN LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get update && apt-get upgrade && apt-get install -y --no-install-recommends slapd ldap-utils openssl \ - slapd ldapscripts ldap-utils ca-certificates ssl-cert +ENV LC_ALL C +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update && apt-get upgrade \ + && apt-get install -y --no-install-recommends slapd ldap-utils ldapscripts EXPOSE 389 636 diff --git a/setup.sh b/setup.sh index e29a829..7b9b567 100755 --- a/setup.sh +++ b/setup.sh @@ -94,7 +94,6 @@ if [[ "$mode" == "" || "$mode" == "--populate-static-data" ]]; then sudo mkdir "$static_data_dir/data/php-fpm" sudo mkdir "$static_data_dir/data/php-fpm/frontend" sudo mkdir "$static_data_dir/data/php-fpm/rest" - sudo mkdir "$static_data_dir/data/php-fpm/pgadmin" sudo mkdir "$static_data_dir/data/php-fpm/ldapadmin" sudo mkdir "$static_data_dir/data/cron" sudo mkdir "$static_data_dir/data/cron/d" @@ -122,6 +121,7 @@ fi img_postgres="$prefix/postgres" img_nginx="$prefix/nginx" img_phpfpm="$prefix/php-fpm" +img_pgadmin="$prefix/pgadmin" img_cron="$prefix/cron" # @@ -136,8 +136,8 @@ cnt_nginx_internal="$prefix-nginx.internal" # php-fpm cnt_phpfpm_frontend="$prefix-php-fpm.frontend" cnt_phpfpm_rest="$prefix-php-fpm.rest" -cnt_phpfpm_pgadmin="$prefix-php-fpm.pgadmin" -cnt_phpfpm_ldapadmin="$prefix-php-fpm.ldapadmin" +cnt_pgadmin="$prefix-pgadmin" +#cnt_phpfpm_ldapadmin="$prefix-ldapadmin" # cron cnt_cron="$prefix-cron" @@ -209,13 +209,12 @@ if [[ "$mode" == "" || "$mode" == "--run" ]]; then # - pgadmin docker run -d \ - -v "$static_data_dir/data/php-fpm/pgadmin/":/opt/php/pgadmin/ \ + -v "$static_data_dir/configs/pgadmin/":/opt/php/pgadmin/conf/:ro \ -v "$static_data_dir/logs/php-fpm/":/var/log/php-fpm \ -v "$static_data_dir/run/php-fpm/":/var/run/php-fpm \ --link $cnt_postgres:$cnt_postgres \ - -e "APP_NAME=pgadmin" \ - --name $cnt_phpfpm_pgadmin \ - $img_phpfpm + --name $cnt_pgadmin \ + $img_pgadmin # - ldapadmin #docker run -d \ diff --git a/static_data/configs/pgadmin/config.inc.php b/static_data/configs/pgadmin/config.inc.php new file mode 100644 index 0000000..46b6979 --- /dev/null +++ b/static_data/configs/pgadmin/config.inc.php @@ -0,0 +1,123 @@ + diff --git a/static_data/data/php-fpm/pgadmin/index.php b/static_data/data/php-fpm/pgadmin/index.php deleted file mode 100644 index 4a502cc..0000000 --- a/static_data/data/php-fpm/pgadmin/index.php +++ /dev/null @@ -1,4 +0,0 @@ -

PHP-FPM: pgadmin

- \ No newline at end of file