From d2b8afc1f219e3db7c776a17c0f03128476ddefa Mon Sep 17 00:00:00 2001 From: startxfr Date: Sat, 28 Nov 2015 05:57:08 +0100 Subject: switching to fedora 23 in master. Start adding docker-compose support --- Applications/dockerhub_run.sh | 3 --- Applications/phpmyadmin/Dockerfile | 4 +-- OS/Centos/Dockerfile | 9 ------- OS/Centos/README.md | 39 ----------------------------- OS/Dockerfile | 10 ++++++++ OS/Fedora/Dockerfile | 10 -------- OS/Fedora/README.md | 37 --------------------------- OS/README.md | 51 ++++++++++++++++++++++++++++++++++++++ OS/docker-compose.yml | 8 ++++++ OS/dockerhub_run.sh | 3 --- OS/local_build.sh | 3 --- OS/local_run.sh | 3 --- Services/apache/Dockerfile | 4 +-- Services/dockerhub_run.sh | 10 -------- Services/mariadb/Dockerfile | 7 ++---- Services/memcache/Dockerfile | 2 +- Services/mongo/Dockerfile | 4 +-- Services/nodejs/Dockerfile | 4 +-- Services/ooconv/Dockerfile | 4 +-- Services/php/Dockerfile | 4 +-- Services/postgres/Dockerfile | 4 +-- Services/ssh/Dockerfile | 6 ++--- dockerhub_run.sh | 4 --- local_build.sh | 2 +- local_run.sh | 2 +- 25 files changed, 91 insertions(+), 146 deletions(-) delete mode 100755 Applications/dockerhub_run.sh delete mode 100644 OS/Centos/Dockerfile delete mode 100644 OS/Centos/README.md create mode 100644 OS/Dockerfile delete mode 100644 OS/Fedora/Dockerfile delete mode 100644 OS/Fedora/README.md create mode 100644 OS/README.md create mode 100644 OS/docker-compose.yml delete mode 100755 OS/dockerhub_run.sh delete mode 100755 OS/local_build.sh delete mode 100755 OS/local_run.sh delete mode 100755 Services/dockerhub_run.sh delete mode 100755 dockerhub_run.sh diff --git a/Applications/dockerhub_run.sh b/Applications/dockerhub_run.sh deleted file mode 100755 index 2c25afb..0000000 --- a/Applications/dockerhub_run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/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/phpmyadmin/Dockerfile b/Applications/phpmyadmin/Dockerfile index d63c460..416b66b 100644 --- a/Applications/phpmyadmin/Dockerfile +++ b/Applications/phpmyadmin/Dockerfile @@ -1,8 +1,8 @@ FROM startx/sv-php MAINTAINER Christophe LARUE -RUN yum -y install phpMyAdmin \ - && yum clean all +RUN dnf -y install phpMyAdmin \ + && dnf clean all COPY config.php /etc/phpMyAdmin/config.inc.php COPY test.php /var/www/html/test.php diff --git a/OS/Centos/Dockerfile b/OS/Centos/Dockerfile deleted file mode 100644 index e599305..0000000 --- a/OS/Centos/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM centos:latest -MAINTAINER Christophe LARUE - -USER root -# Install minimal packages -RUN yum -y install deltarpm pwgen tar psmisc \ - && yum -y update \ - && yum clean all \ - && mkdir -p /sx diff --git a/OS/Centos/README.md b/OS/Centos/README.md deleted file mode 100644 index 8b97a9c..0000000 --- a/OS/Centos/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# STARTX OS docker-images : Fedora -================================== - -Centos image builded with minimal and updated binaries - - -## Running from docker registry - - docker run -it --name="centos" startx/centos - -## Build and run from local Dockerfile -### Building docker image -Copy sources in your docker host - - mkdir startx-docker-images; - cd startx-docker-images; - git clone https://github.com/startxfr/docker-images.git . - -Build the container - - docker build -t centos OS/Centos/ - -### Running local image - - docker run -it --name="centos" centos bash - -## Accessing server - - # Start interactive shell - docker run -it startx/centos bash - # Start as a daemon - 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/centos) -* [Github STARTX profile](https://github.com/startxfr/docker-images) -* [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/Dockerfile b/OS/Dockerfile new file mode 100644 index 0000000..ce00afb --- /dev/null +++ b/OS/Dockerfile @@ -0,0 +1,10 @@ +FROM fedora:latest +MAINTAINER Christophe LARUE + +USER root +# Install minimal packages +RUN dnf -y install deltarpm pwgen tar python-dnf-plugins-extras-migrate && \ + dnf-2 migrate && \ + dnf -y install psmisc coreutils findutils wget logrotate && \ + dnf clean all +RUN mkdir -p /sx diff --git a/OS/Fedora/Dockerfile b/OS/Fedora/Dockerfile deleted file mode 100644 index ce00afb..0000000 --- a/OS/Fedora/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM fedora:latest -MAINTAINER Christophe LARUE - -USER root -# Install minimal packages -RUN dnf -y install deltarpm pwgen tar python-dnf-plugins-extras-migrate && \ - dnf-2 migrate && \ - dnf -y install psmisc coreutils findutils wget logrotate && \ - dnf clean all -RUN mkdir -p /sx diff --git a/OS/Fedora/README.md b/OS/Fedora/README.md deleted file mode 100644 index 3d26fc7..0000000 --- a/OS/Fedora/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# STARTX OS docker-images : Fedora - -Fedora image builded with minimal and updated binaries - -## Running from docker registry - - docker run -it --name="fedora" startx/fedora - -## Build and run from local Dockerfile -### Building docker image -Copy sources in your docker host - - mkdir startx-docker-images; - cd startx-docker-images; - git clone https://github.com/startxfr/docker-images.git . - -Build the container - - docker build -t fedora OS/Fedora/ - -### Running local image - - docker run -it --name="fedora" fedora bash - -## Accessing server - - # Start interactive shell - docker run -it startx/fedora bash - # Start as a daemon - docker run -d startx/fedora bash - docker exec -it fedora /bin/bash - -## Related Resources -* [Sources files](https://github.com/startxfr/docker-images/tree/master/Services/fedora) -* [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 diff --git a/OS/README.md b/OS/README.md new file mode 100644 index 0000000..150ba21 --- /dev/null +++ b/OS/README.md @@ -0,0 +1,51 @@ +# STARTX OS docker-images : Fedora + +Fedora image builded with minimal and updated rpm and core-utils loaded + +## Running from docker registry + + docker run -it --name="fedora" startx/fedora + +## Build and run from local Dockerfile +1. Building docker image + + # Step 1 : Copy sources in your docker host + mkdir startx-docker-images; + cd startx-docker-images; + git clone https://github.com/startxfr/docker-images.git . + # Step 2 : Build the container + docker build -t fedora OS/ + +2. Running local image + + docker run -it --name="fedora" fedora bash + + +## Building and running using docker-compose +1. Building from source + + # Step 1 : Copy sources in your docker host + mkdir startx-docker-images; + git clone https://github.com/startxfr/docker-images.git startx-docker-images; + cd startx-docker-images/OS; + # Step 2 : Build the container + docker-compose build; + +2. Running this service + + docker-compose up -d; + docker-compose logs; + +## Accessing server + + # Start interactive shell + docker run -it startx/fedora bash + # Start as a daemon + docker run -d startx/fedora bash + docker exec -it fedora /bin/bash + +## Related Resources +* [Sources files](https://github.com/startxfr/docker-images/tree/master/Services/fedora) +* [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 diff --git a/OS/docker-compose.yml b/OS/docker-compose.yml new file mode 100644 index 0000000..65ce1f3 --- /dev/null +++ b/OS/docker-compose.yml @@ -0,0 +1,8 @@ +server: + build: ./ +# image: sx-fedora + container_name: "sx-fedora" + mem_limit: 1g + memswap_limit: 2g + cpu_shares: 4096 + restart: "on-failure:2" \ No newline at end of file diff --git a/OS/dockerhub_run.sh b/OS/dockerhub_run.sh deleted file mode 100755 index 2209c2f..0000000 --- a/OS/dockerhub_run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/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 deleted file mode 100755 index 9491a4d..0000000 --- a/OS/local_build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/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 deleted file mode 100755 index 4d3e435..0000000 --- a/OS/local_run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/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/apache/Dockerfile b/Services/apache/Dockerfile index 10a6e1f..d382ea7 100644 --- a/Services/apache/Dockerfile +++ b/Services/apache/Dockerfile @@ -3,8 +3,8 @@ MAINTAINER Christophe LARUE USER root # Install packages and set up httpd -RUN yum -y install httpd \ - && yum clean all \ +RUN dnf -y install httpd \ + && dnf clean all \ && mkdir -p /var/www/html \ && mkdir -p /var/log/httpd # Copy startx toolkit diff --git a/Services/dockerhub_run.sh b/Services/dockerhub_run.sh deleted file mode 100755 index 3b3d06d..0000000 --- a/Services/dockerhub_run.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/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 2002:2002 --name="ooconv" startx/sv-ooconv -docker run -d -p 22022:22 --name="ssh" startx/sv-ssh \ No newline at end of file diff --git a/Services/mariadb/Dockerfile b/Services/mariadb/Dockerfile index 3dc35fe..5efa265 100644 --- a/Services/mariadb/Dockerfile +++ b/Services/mariadb/Dockerfile @@ -1,11 +1,8 @@ FROM startx/fedora MAINTAINER Christophe LARUE -RUN yum -y install \ - mariadb-libs \ - mariadb-server \ - mariadb \ - && yum clean all \ +RUN dnf -y install mariadb-common mariadb-libs mariadb-config mariadb-errmsg mariadb-server mariadb \ + && dnf clean all \ && mkdir -p /var/log/mysql \ && touch /var/log/mysql/.keep /var/lib/mysql/.keep \ && chown -R mysql:mysql /var/log/mysql /var/lib/mysql \ diff --git a/Services/memcache/Dockerfile b/Services/memcache/Dockerfile index b71fb6f..6bc68fe 100644 --- a/Services/memcache/Dockerfile +++ b/Services/memcache/Dockerfile @@ -1,7 +1,7 @@ FROM startx/fedora MAINTAINER Christophe LARUE -RUN yum -y install memcached memcached-selinux && yum clean all +RUN dnf -y install memcached memcached-selinux && yum clean all COPY sx/* /sx/ RUN chmod ug+rx /sx/memcache* diff --git a/Services/mongo/Dockerfile b/Services/mongo/Dockerfile index 0199e76..85261c8 100644 --- a/Services/mongo/Dockerfile +++ b/Services/mongo/Dockerfile @@ -1,14 +1,14 @@ FROM startx/fedora MAINTAINER Christophe LARUE -RUN yum -y install \ +RUN dnf -y install \ mongodb \ mongodb-server \ libmongo-client \ rsyslog-mongodb \ mongodb-mms-backup-agent \ mongodb-mms-monitoring-agent \ - && yum clean all \ + && dnf clean all \ && mkdir -p /var/lib/mongodb \ && touch /var/lib/mongodb/.keep COPY sx/* /sx/ diff --git a/Services/nodejs/Dockerfile b/Services/nodejs/Dockerfile index c25c32d..dc20d72 100644 --- a/Services/nodejs/Dockerfile +++ b/Services/nodejs/Dockerfile @@ -1,8 +1,8 @@ FROM startx/fedora MAINTAINER Christophe LARUE -RUN yum -y install nodejs npm python make gcc \ - && yum clean all \ +RUN dnf -y install nodejs npm python make gcc \ + && dnf clean all \ && mkdir -p /app \ && chmod ug+rx /app VOLUME ["/app"] diff --git a/Services/ooconv/Dockerfile b/Services/ooconv/Dockerfile index 699f6de..f8ce949 100644 --- a/Services/ooconv/Dockerfile +++ b/Services/ooconv/Dockerfile @@ -3,8 +3,8 @@ MAINTAINER Christophe LARUE USER root # Install packages and set up unoconv -RUN yum -y install unoconv libreoffice-headless libreoffice-writer libreoffice-calc pdftk gs \ - && yum clean all \ +RUN dnf -y install unoconv libreoffice-headless libreoffice-writer libreoffice-calc pdftk gs \ + && dnf clean all \ && mkdir -p /tmp/ootmp # Copy startx toolkit COPY sx/* /sx/ diff --git a/Services/php/Dockerfile b/Services/php/Dockerfile index 2c86f15..60985df 100644 --- a/Services/php/Dockerfile +++ b/Services/php/Dockerfile @@ -2,12 +2,12 @@ FROM startx/sv-apache MAINTAINER Christophe LARUE USER root -RUN yum -y install php php-pecl-mongo php-cli php-pear \ +RUN dnf -y install php php-pecl-mongo php-cli php-pear \ php-gd php-mcrypt php-mysqlnd php-soap php-pecl-xdebug \ php-pdo php-process php-common php-mbstring \ php-bcmath php-pecl-zip php-php-gettext php-tcpdf \ php-tcpdf-dejavu-sans-fonts php-tidy \ - && yum clean all + && dnf clean all # Copy application content COPY app/* /var/www/html/ COPY httpd.conf /etc/httpd/conf.d/sx.conf diff --git a/Services/postgres/Dockerfile b/Services/postgres/Dockerfile index 0f2a617..2af22b1 100644 --- a/Services/postgres/Dockerfile +++ b/Services/postgres/Dockerfile @@ -1,8 +1,8 @@ FROM startx/fedora MAINTAINER Christophe LARUE -RUN yum -y install postgresql postgresql-libs postgresql-server \ - && yum clean all \ +RUN dnf -y install postgresql postgresql-libs postgresql-server \ + && dnf clean all \ && mkdir -p /var/log/pgsql /var/lib/pgsql \ && touch /var/log/pgsql/.keep /var/lib/pgsql/.keep \ && chown -R postgres:postgres /var/log/pgsql /var/lib/pgsql diff --git a/Services/ssh/Dockerfile b/Services/ssh/Dockerfile index 2ad849c..7a582b1 100644 --- a/Services/ssh/Dockerfile +++ b/Services/ssh/Dockerfile @@ -2,9 +2,9 @@ FROM startx/fedora MAINTAINER Christophe LARUE # Install packages and set up sshd -RUN yum -y update \ - && yum -y install openssh-server \ - && yum clean all +RUN dnf -y update \ + && dnf -y install openssh-server \ + && dnf clean all # Copy startx toolkit COPY sx/* /sx/ # Copy ssh keys diff --git a/dockerhub_run.sh b/dockerhub_run.sh deleted file mode 100755 index 66f4b9d..0000000 --- a/dockerhub_run.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/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 index 1be05e3..67dfb0e 100755 --- a/local_build.sh +++ b/local_build.sh @@ -1,4 +1,4 @@ #!/bin/bash -OS/local_build.sh +cd OS; docker-compose build; cd -; Services/local_build.sh Applications/local_build.sh \ No newline at end of file diff --git a/local_run.sh b/local_run.sh index 2da2d96..010a4d9 100755 --- a/local_run.sh +++ b/local_run.sh @@ -1,4 +1,4 @@ #!/bin/bash -OS/local_run.sh +cd OS; docker-compose up -d; cd -; Services/local_run.sh Applications/local_run.sh \ No newline at end of file -- cgit v1.2.3