From cb3d01d012d3b4d1fc24a5719ec13acdf2de60b1 Mon Sep 17 00:00:00 2001 From: startxfr Date: Fri, 4 Dec 2015 02:35:23 +0100 Subject: improving general README.md --- OS/Dockerfile | 2 +- OS/README.md | 97 ++++++++++++++++++++++++++++++++++++----------------------- README.md | 38 +++++++++++------------ 3 files changed, 80 insertions(+), 57 deletions(-) diff --git a/OS/Dockerfile b/OS/Dockerfile index 45efeef..dba7035 100644 --- a/OS/Dockerfile +++ b/OS/Dockerfile @@ -5,7 +5,7 @@ USER root # Install minimal packages RUN dnf -y install deltarpm pwgen tar python-dnf-plugins-extras-migrate && \ dnf-2 migrate && \ - dnf -y install psmisc procps coreutils findutils wget logrotate tar zip && \ + dnf -y install psmisc procps coreutils findutils wget logrotate zip && \ dnf clean all COPY *.sh /bin/ RUN chmod 775 /bin/sx-lib.sh /bin/run.sh diff --git a/OS/README.md b/OS/README.md index eda12f5..938d20e 100644 --- a/OS/README.md +++ b/OS/README.md @@ -1,51 +1,74 @@ -# STARTX OS docker-images : Fedora -Fedora image builded with minimal and updated rpm and core-utils loaded (utils like ps, top, find, wget) -All other images on this repository are build on top of this container image + -## Running from docker registry +# Fedora OS container's - docker run -it --name="fedora" startx/fedora +Simple container used for all startx based services and application published in [Dockerhub registry](https://github.com/startxfr/docker-images). +This container contain updated core OS rpm (kernel, libs,...) as well as usefull tools like pwgen, tar, zip, psmisc, procps, coreutils, findutils, wget -## Build and run from local Dockerfile -1. Building docker image +| [![Build Status](https://travis-ci.org/startxfr/docker-images.svg)](https://travis-ci.org/startxfr/docker-images) | [Dockerhub Registry](https://hub.docker.com/r/startx/fedora) | [Sources](https://github.com/startxfr/docker-images/OS/) | [STARTX Profile](https://github.com/startxfr) | +|-------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|----------------------------------------------------------------------|-----------------------------------------------| - # 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 +## Available flavours - docker run -it --name="fedora" fedora bash +* `:latest` : Fedora core 23 at this time +* `:23` : Fedora core 23 +* `:22` : Fedora core 22 +* `:21` : Fedora core 21 +* `:21` : Fedora core 21 +## Running from dockerhub registry -## Building and running using docker-compose -1. Building from source +* with `docker` you can run `docker run -it --name="fedora" startx/fedora` from every docker host +* with `docker-compose` you can create a docker-compose.yml file with the following content +``` +fedora: + image: startx/fedora + container_name: "os-fedora" + environment: + CONTAINER_TYPE: "os" + CONTAINER_SERVICE: "fedora" + CONTAINER_INSTANCE: "os-fedora" +``` - # 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; +## Using this image in your own container -2. Running this service +You can use this Dockerfile template to start a new prsonalized container based on this container + ``` +FROM startx/fedora:latest +#... your container specifications +CMD ["/bin/run.sh"] +``` - docker-compose up -d; - docker-compose logs; +## For advanced users -## Accessing server +You you want to use this container and code to build and create locally this container. You can follow theses instructions to setup and working environment. - # 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 +This section will help you if you want to : +* Get latest version of this container OS +* Enhance container content by adding instruction in Dockefile before build step -## 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 +You must have a working environment with the source code of this repository. Read and follow [how to setup your working environment](https://github.com/startxfr/docker-images#setup-your-working-environment-mandatory) to get a working directory. The following instructions assume you are at the top level of your working directory. + +### Build & run a container using `docker` + +1. Jump into the container directory with `cd OS` +2. Build the container using `docker build -t fedora .` +3. Run this container + 1. Interactively with `docker run -it fedora`. If you add a second parameter (like `/bin/bash`) to will run this command instead of the default entrypoint. Usefull to interact with this container (ex: `/bin/bash`, `/bin/ps -a`, `/bin/df -h`,...) + 2. As a daemon with `docker run -d fedora` + + +### Build & run a container using `docker-compose` + +1. Jump into the container directory with `cd OS` +2. Run this container + 1. Interactively with `docker-compose up` Startup logs appears and escaping this command stop the container + 2. As a daemon with `docker-compose up -d`. Container startup and behaviour can be read using `docker-compose logs` diff --git a/README.md b/README.md index 6b0467e..28fc907 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,10 @@ or as a parent container in your own container's. Each container is provided with various underlying OS version based on CentOS or Fedora Linux distribution. -You can read each container manual for more information on how you can use it in +Please **read each container manual** for more information on how you can use it in your project and start using stable or experimental services in your applications -| [![Build Status](https://travis-ci.org/startxfr/docker-images.svg)](https://travis-ci.org/startxfr/docker-images) | [Registry](https://github.com/startxfr/docker-images) | [Sources](https://github.com/startxfr/docker-images/tree/master/) | [STARTX Profile](https://github.com/startxfr) | +| [![Build Status](https://travis-ci.org/startxfr/docker-images.svg)](https://travis-ci.org/startxfr/docker-images) | [Dockerhub Registry](https://hub.docker.com/r/startx) | [Sources](https://github.com/startxfr/docker-images/) | [STARTX Profile](https://github.com/startxfr) | |-------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------|-------------------------------------------------------------------|-----------------------------------------------| ## Available services and images @@ -28,39 +28,39 @@ your project and start using stable or experimental services in your application | OS | Docker Hub repository | Flavour | Documentation | |---------------|------------------------------------------------------------|------------------------------------|--------------------------------------| -| Fedora Core | [`startx/fedora`](https://hub.docker.com/r/startx/fedora) | `:latest` `:20` `:21` `:22` `:23` | [manual](tree/master/OS/README.md) | -| CentOS | [`startx/centos`](https://hub.docker.com/r/startx/centos) | `:6` `:7` | [manual](tree/centos7/OS/README.md) | +| Fedora Core | [`startx/fedora`](https://hub.docker.com/r/startx/fedora) | `:latest` `:20` `:21` `:22` `:23` | [manual](OS/README.md) | +| CentOS | [`startx/centos`](https://hub.docker.com/r/startx/centos) | `:6` `:7` | [manual](../centos7/OS/README.md) | ### Services | Service | Docker Hub repository | Fedora | CentOS | Doc | |---------------|---------------------------------------------------------------------|-------------------------------------------|-------------------------|---------------------------------------------------| -| Apache | [`startx/sv-apache`](https://hub.docker.com/r/startx/sv-apache) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](tree/master/Services/apache/README.md) | -| MariaDB | [`startx/sv-mariadb`](https://hub.docker.com/r/startx/sv-mariadb) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](tree/master/Services/mariadb/README.md) | -| Memcache | [`startx/sv-memcache`](https://hub.docker.com/r/startx/sv-memcache) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](tree/master/Services/memcache/README.md) | -| MongoDB | [`startx/sv-mongo`](https://hub.docker.com/r/startx/sv-mongo) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](tree/master/Services/mongo/README.md) | -| nodejs | [`startx/sv-nodejs`](https://hub.docker.com/r/startx/sv-nodejs) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](tree/master/Services/nodejs/README.md) | -| ooconv | [`startx/sv-ooconv`](https://hub.docker.com/r/startx/sv-ooconv) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](tree/master/Services/ooconv/README.md) | -| php | [`startx/sv-php`](https://hub.docker.com/r/startx/sv-php) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](tree/master/Services/php/README.md) | -| postgreSQL | [`startx/sv-postgres`](https://hub.docker.com/r/startx/sv-postgres) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](tree/master/Services/postgres/README.md) | +| Apache | [`startx/sv-apache`](https://hub.docker.com/r/startx/sv-apache) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](Services/apache/README.md) | +| MariaDB | [`startx/sv-mariadb`](https://hub.docker.com/r/startx/sv-mariadb) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](Services/mariadb/README.md) | +| Memcache | [`startx/sv-memcache`](https://hub.docker.com/r/startx/sv-memcache) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](Services/memcache/README.md) | +| MongoDB | [`startx/sv-mongo`](https://hub.docker.com/r/startx/sv-mongo) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](Services/mongo/README.md) | +| nodejs | [`startx/sv-nodejs`](https://hub.docker.com/r/startx/sv-nodejs) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](Services/nodejs/README.md) | +| ooconv | [`startx/sv-ooconv`](https://hub.docker.com/r/startx/sv-ooconv) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](Services/ooconv/README.md) | +| php | [`startx/sv-php`](https://hub.docker.com/r/startx/sv-php) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](Services/php/README.md) | +| postgreSQL | [`startx/sv-postgres`](https://hub.docker.com/r/startx/sv-postgres) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](Services/postgres/README.md) | ### Applications | Service | Docker Hub repository | Fedora | CentOS | Doc | |-----------------|---------------------------------------------------------------------------|-------------------------------------------|-------------------------|---------------------------------------------------------| -| PhpMyAdmin | [`startx/app-pma`](https://hub.docker.com/r/startx/app-pma) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](tree/master/Applications/pma/README.md) | -| RockMongo | [`startx/app-rockmongo`](https://hub.docker.com/r/startx/app-rockmongo) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](tree/master/Applications/rockmongo/README.md) | +| PhpMyAdmin | [`startx/app-pma`](https://hub.docker.com/r/startx/app-pma) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](Applications/pma/README.md) | +| RockMongo | [`startx/app-rockmongo`](https://hub.docker.com/r/startx/app-rockmongo) | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` | [manual](Applications/rockmongo/README.md) | ## For advanced users -You you want to use this repository and code to build and create locally theses containers. You can follow theses instructions to settup and working environment. +You you want to use this repository and code to build and create locally theses containers. You can follow theses instructions to setup and working environment. This section is usefull if you want : * Get latest version of embedded services, applications and underlying OS -* Ehance container content by adding instruction into container(s) Dockefile before the build process +* Enhance container content by adding instruction into container(s) Dockefile before the build process * Use this set of container and flavour to benchmark application performance ### Setup your working environment (mandatory) @@ -73,7 +73,7 @@ This section is usefull if you want : 2. Clone source repository with `git clone https://github.com/startxfr/docker-images.git .` -### Build all containers (using docker-compose) +### Build all containers using `docker-compose` If you want to build and run locally all the images provided in this repository, you can follow this instructions @@ -99,7 +99,7 @@ If you want to build and run locally all the images provided in this repository, 1. Jump into the container directory you wan to build with `cd ` where *path_to_service* is the targeted service or application directory, not including the docker-compose.yml filename 2. Run this container - 1. Interactively with `docker-compose up`You should see container startup logs and escaping this command will stop the container + 1. Interactively with `docker-compose up`. You should see container startup logs and escaping this command will stop the container 2. As a daemon with `docker-compose up -d`. You can look at your container startup and behaviour with `docker-compose logs` @@ -284,6 +284,6 @@ Running an image as a daemon docker exec -it ## Related Resources -* [Sources files](https://github.com/startxfr/docker-images/tree/master/) +* [Sources files](https://github.com/startxfr/docker-images/) * [Github STARTX profile](https://github.com/startxfr/docker-images) * [Docker registry for this container](https://registry.hub.docker.com/u/startx/fedora/) \ No newline at end of file -- cgit v1.2.1