diff options
author | startxfr <clarue@startx.fr> | 2014-12-08 23:49:15 +0100 |
---|---|---|
committer | startxfr <clarue@startx.fr> | 2014-12-08 23:49:15 +0100 |
commit | 76fbe43a8e1cb13cfe4a24bb78ac510a13c85651 (patch) | |
tree | 14c8aac5aa405791025ae12ae9553ebe299bef8e /Services | |
parent | ef2c1df934ee7720fd1ccacae042f3deb3b7628d (diff) | |
download | phpmyadmin-76fbe43a8e1cb13cfe4a24bb78ac510a13c85651.tar.gz phpmyadmin-76fbe43a8e1cb13cfe4a24bb78ac510a13c85651.tar.bz2 phpmyadmin-76fbe43a8e1cb13cfe4a24bb78ac510a13c85651.tar.xz phpmyadmin-76fbe43a8e1cb13cfe4a24bb78ac510a13c85651.zip |
adding example for using volumes
Diffstat (limited to 'Services')
-rw-r--r-- | Services/apache/README.md | 6 | ||||
-rw-r--r-- | Services/mariadb/README.md | 8 | ||||
-rw-r--r-- | Services/mongo/README.md | 5 | ||||
-rw-r--r-- | Services/nodejs/README.md | 6 | ||||
-rw-r--r-- | Services/ooconv/README.md | 44 | ||||
-rw-r--r-- | Services/php/README.md | 6 | ||||
-rw-r--r-- | Services/postgres/README.md | 3 |
7 files changed, 73 insertions, 5 deletions
diff --git a/Services/apache/README.md b/Services/apache/README.md index ae07abb..b42fdd0 100644 --- a/Services/apache/README.md +++ b/Services/apache/README.md @@ -4,6 +4,12 @@ This container run apache on fedora server. ## Running from docker registry docker run -d -p 80:80 --name="apache" startx/sv-apache + # when used with a volume container (run data container, then run service) + docker run -d -v /var/www/html -v /var/log/httpd --name apache-data startx/sv-apache echo "Data container for apache" + docker run -d -p 80:80 --volumes-from apache-data --name="apache" startx/sv-apache + # when used in a linked container + docker run -d --name="apache" startx/sv-apache + docker run -d -p 80:80 --name="apache2" --link apache:apache startx/sv-apache ## Build and run from local Dockerfile ### Building docker image diff --git a/Services/mariadb/README.md b/Services/mariadb/README.md index db7e14e..76d4842 100644 --- a/Services/mariadb/README.md +++ b/Services/mariadb/README.md @@ -4,11 +4,11 @@ This container run mariadb on fedora server. ## Running from docker registry docker run -d -p 3306:3306 --name="mariadb" startx/sv-mariadb - # when used with a volume container - docker run -d -v /var/lib/mysql -v /var/log/mysql --name mariadb-data startx/sv-mariadb - docker run -d --volumes-from mariadb-data -p 3306:3306 --name="mariadb" startx/sv-mariadb + # when used with a volume container (run data container, then run service) + docker run -d -v /var/lib/mysql -v /var/log/mysql --name mariadb-data startx/sv-mariadb echo "Data container for mariadb" + docker run -d -p 3306:3306 --volumes-from mariadb-data --name="mariadb" startx/sv-mariadb # when used in a linked container - docker run -d -p 3306:3306 --name="mariadb" startx/sv-mariadb + docker run -d --name="mariadb" startx/sv-mariadb docker run -d --name="php" --link mariadb:mariadb startx/sv-php ## Build and run from local Dockerfile diff --git a/Services/mongo/README.md b/Services/mongo/README.md index aa23252..dcdc1cc 100644 --- a/Services/mongo/README.md +++ b/Services/mongo/README.md @@ -4,9 +4,12 @@ This container run mongod on fedora server. ## Running from docker registry docker run -d -p 27017:27017 --name="mongo" startx/sv-mongo + # when used with a volume container (run data container, then run service) + docker run -d -v /var/lib/mongodb -v /var/log/mongodb --name mongo-data startx/sv-mongo echo "Data container for mongodb" + docker run -d -p 27017:27017 --volumes-from mongo-data --name="mongo" startx/sv-mongo when linked to another container docker run -d --name="mongo" startx/sv-mongo - docker run -d --name="php" --link mongo:mongo startx/sv-php + docker run -d -p 80:80 --name="php" --link mongo:mongo startx/sv-php ## Build and run from local Dockerfile ### Building docker image diff --git a/Services/nodejs/README.md b/Services/nodejs/README.md index 30c37c0..974d541 100644 --- a/Services/nodejs/README.md +++ b/Services/nodejs/README.md @@ -4,6 +4,12 @@ This container run nodejs on fedora server. ## Running from docker registry docker run -d -p 8000:8000 --name="nodejs" startx/sv-nodejs + # when used with a volume container (run data container, then run service) + docker run -d -v /var/nodejs/app --name nodejs-data startx/sv-nodejs echo "Data container for nodejs" + docker run -d -p 8000:8000 --volumes-from nodejs-data --name="nodejs" startx/sv-nodejs + when linked to another container + docker run -d --name="mongo" startx/sv-mongo + docker run -d -p 8000:8000 --name="nodejs" --link mongo:mongo startx/sv-nodejs ## Build and run from local Dockerfile ### Building docker image diff --git a/Services/ooconv/README.md b/Services/ooconv/README.md index 4f98429..34a232a 100644 --- a/Services/ooconv/README.md +++ b/Services/ooconv/README.md @@ -1,3 +1,47 @@ +# STARTX Services docker-images : NodeJS Server +This container run ooconv on fedora server. + +## Running from docker registry + + docker run -d -p 2002:2002 --name="ooconv" startx/sv-ooconv + # when used with a volume container (run data container, then run service) + docker run -d -v /tmp/ootmp --name ooconv-data startx/sv-ooconv echo "Data container for ooconv" + docker run -d -p 2002:2002 --volumes-from ooconv-data --name="ooconv" startx/sv-ooconv + when linked to another container + docker run -d --name="ooconv" startx/sv-ooconv + docker run -d -p 80:80 --name="php" --link ooconv:ooconv startx/sv-php + +## 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 sv-ooconv Services/ooconv/ + +### Running local image + + docker run -d -p 2002:2002 --name="ooconv" sv-ooconv + +## Accessing server +access to the running webserver + + firefox http://localhost:2002 + +access to the container itself + + docker exec -it ooconv /bin/bash + +## Related Resources +* [Sources files](https://github.com/startxfr/docker-images/tree/master/Services/ooconv) +* [Github STARTX profile](https://github.com/startxfr/docker-images) +* [Docker registry for this container](https://registry.hub.docker.com/u/startx/sv-ooconv/) +* [Docker registry for Fedora](https://registry.hub.docker.com/u/fedora/) + STARTX docker-images - OOConv ============================= diff --git a/Services/php/README.md b/Services/php/README.md index 5a407a4..7f1161f 100644 --- a/Services/php/README.md +++ b/Services/php/README.md @@ -4,6 +4,12 @@ This container run php via apache on fedora server. ## Running from docker registry docker run -d -p 80:80 --name="php" startx/sv-php + # when used with a volume container (run data container, then run service) + docker run -d -v /var/www/html -v /var/log/httpd --name php-data startx/sv-php echo "Data container for php webserver" + docker run -d -p 80:80 --volumes-from php-data --name="php" startx/sv-php + when linked to another container + docker run -d --name="mongo" startx/sv-mongo + docker run -d -p 80:80 --name="php" --link mongo:mongo startx/sv-php ## Build and run from local Dockerfile ### Building docker image diff --git a/Services/postgres/README.md b/Services/postgres/README.md index 313d67a..ebb5b29 100644 --- a/Services/postgres/README.md +++ b/Services/postgres/README.md @@ -4,6 +4,9 @@ This container run postgres on fedora server. ## Running from docker registry docker run -d -p 5432:5432 --name="postgres" startx/sv-postgres + # when used with a volume container (run data container, then run service) + docker run -d -v /var/log/pgsql -v /var/lib/pgsql --name postgres-data startx/sv-postgres echo "Data container for postgresql" + docker run -d -p 5432:5432 --volumes-from postgres-data --name="postgres" startx/sv-postgres when linked to another container docker run -d --name="postgres" startx/sv-postgres docker run -d --name="php" --link postgres:postgres startx/sv-php |