summaryrefslogtreecommitdiffstats
path: root/README.md
blob: 9a7b410bffb9a389247fea24c52187991d3363cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<!--[metadata]>
+++
title = "STARTX Docker Images Repository"
description = "Docker container repository based on fedora or CentOS and deliverying main opensource project as container"
keywords = ["home, docker, startx, repository, container, swarm, compose, howto, "]
weight=3
+++
<![end-metadata]-->

# STARTX Docker-Images Repository

This repository host various Open Source application or services as a container. 

You can use it to instanciate new container from the dockerhub public registry 
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.

If you're used to work with redhat like and distribution, you would prefer start working
from a container based on this distribution rather than ubuntu or debian like distributions.
OS, services and application you will find here will be closer to your favorite distrbution

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) | [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

### Operating Systems

| OS            | Docker Hub repository                                      | Flavour                            | Documentation                        | 
|---------------|------------------------------------------------------------|------------------------------------|--------------------------------------|
| 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](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](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 setup and working environment.

This section is usefull if you want :
* Get latest version of embedded services, applications and underlying OS
* 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)

1. **Install docker and docker-compose on you environment** 
  1. Check if you have a running docker daemon using `docker --version` If not try to run it using `sudo docker --daemon`. If docker is not installed, follow [docker installation guidelines](https://docs.docker.com/v1.8/installation/)
  2. Check if you have docker compose installed using `docker-compose --version`. If docker-compose is not installed, follow [docker-compose installation guidelines](https://docs.docker.com/compose/install/)
2. **Copy repository source locally**
  1. Setup a working directory with `mkdir startx-docker-images; cd startx-docker-images;`
  2. Clone source repository with `git clone https://github.com/startxfr/docker-images.git .`


### 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

1. Choose your flavour with `git checkout ≤flavour_name>`. You can use every flavour available in this repository. Default is set to master branch related to the `:latest` flavour
2. Create host directory to store container content with `mkdir /tmp/container`.
3. Start building all containers with `docker-compose build`. You should be on top of your working directory to run this command. It will use the docker-compose.yml file located into this directory.
4. Wait... (could take some time as you are building the complete list of services
5. Run your multi-container with `docker-compose up -d`
6. Look at your containers startup with `docker-compose logs`. You can add a service name to get logs about this specific container. You can also monitor /tmp/container/logs to see logs comming from all containers
7. Monitor containers with `docker-compose ps`.

### Run a single container

### Build & run a container using `docker`

1. Build the container using `docker build -t <image_name> <path_to_Dockerfile>` where *image_name* is the name of your future local image and *path_to_Dockerfile* should point to the targeted service or application directory, not including the Dockefile filename
2. Run this container 
  1. Interactively with `docker run -it <image_name>` where *image_name* is the name of your previously created image name. If you add a second parameter, you can run a particular command instead of the default entrypoint. Could be usefull when you add ` /bin/bash` to get a shell running into the container
  2. As a daemon with `docker run -d <image_name>` where *image_name* is the name of your previously created image name. 


### Build & run a container using `docker-compose`

1. Jump into the container directory you wan to build with `cd <path_to_service>` 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
  2. As a daemon with `docker-compose up -d`. You can look at your container startup and behaviour with `docker-compose logs`






## Running container from docker registry images

### Operating Systems
| OS                  | Command                                                              |
|---------------------|----------------------------------------------------------------------|
| Fedora Core         | `docker run -it --name="fedora" startx/fedora bash`                  | 
| CentOS              | `docker run -it --name="centos" startx/centos bash`                  |

### Services
| Services            | Command                                                              |
|---------------------|----------------------------------------------------------------------|
| **Apache**          | `docker run -d -p 80:80 --name="apache" startx/sv-apache`            | 
| **MariaDB**         | `docker run -d -p 3306:3306 --name="mariadb" startx/sv-mariadb`      | 
| **Memcache**        | `docker run -d -p 11211:11211 --name="memcache" startx/sv-memcache`  | 
| **MongoDB**         | `docker run -d -p 27017:27017 --name="mongo" startx/sv-mongo`        | 
| **nodejs**          | `docker run -d -p 8000:8000 --name="nodejs" startx/sv-nodejs`        | 
| **ooconv**          | `docker run -d -p XXX:XXX --name="ooconv" startx/sv-ooconv`          | 
| **php**             | `docker run -d -p 80:80 --name="php" startx/sv-php`                  | 
| **postgreSQL**      | `docker run -d -p 5432:5432 --name="postgres" startx/sv-postgres`    | 

### Applications
| Applications        | Command                                                              |
|---------------------|----------------------------------------------------------------------|
| **PhpMyAdmin**      | `docker run -d -p 80:80 --name="pma" startx/app-pma`                 | 
| **RockMongo**       | `docker run -d -p 80:80 --name="rockmongo" startx/app-rockmongo`     | 

## Flavors (tags) for Red Hat like container's

This repository offer various flavour of Red Hat like distribution. Tag `:latest` is actually pointing to fedora core 20

### Operating Systems
| OS            | Docker Hub repository          | Flavour                            |
|---------------|--------------------------------|------------------------------------|
| Fedora Core   | `startx/fedora`                | `:latest` `:20` `:21` `:22` `:23`  | 
| CentOS        | `startx/centos`                | `:6` `:7`                          |

### Services
| Service    | Docker Hub repository | Fedora                                    | CentOS                |
|------------|-----------------------|-------------------------------------------|-----------------------|
| Apache     | `startx/sv-apache`    | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` |
| MariaDB    | `startx/sv-mariadb`   | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` |
| Memcache   | `startx/sv-memcache`  | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` |
| MongoDB    | `startx/sv-mongo`     | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` |
| nodejs     | `startx/sv-nodejs`    | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` |
| ooconv     | `startx/sv-ooconv`    | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` |
| php        | `startx/sv-php`       | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` |
| postgreSQL | `startx/sv-postgres`  | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` |

### Applications
| Service    | Docker Hub repository | Fedora                                    | CentOS                |
|------------|-----------------------|-------------------------------------------|-----------------------|
| PhpMyAdmin | `startx/sv-pma`       | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` |
| RockMongo  | `startx/sv-rockmongo` | `:latest` `:fc20` `:fc21` `:fc22` `:fc23` | `:centos6` `:centos7` |

### Running sample container's

#### Fedora Core latest (actually fc23) container's

	# For Fedora example, port start from 50100
	docker run -d -it --name="fedora" startx/fedora bash
	docker run -d -p 50100:80 --name="fedora-apache" startx/sv-apache
	docker run -d -p 50101:3306 --name="fedora-mariadb" startx/sv-mariadb
	docker run -d -p 50102:11211 --name="fedora-memcache" startx/sv-memcache
	docker run -d -p 50103:27017 --name="fedora-mongo" startx/sv-mongo
	docker run -d -p 50104:8000 --name="fedora-nodejs" startx/sv-nodejs
	docker run -d -p 50105:80 --name="fedora-php" startx/sv-php
	docker run -d -p 50106:5432 --name="fedora-postgres" startx/sv-postgres
	docker run -d -p 50108:80 --name="fedora-pma" startx/app-pma
	docker run -d -p 50109:80 --name="fedora-rockmongo" startx/app-rockmongo

#### Fedora Core 20 container's

	# For Fedora core 20 example, port start from 50200
	docker run -d -it --name="fedora20" startx/fedora:20 bash
	docker run -d -p 50200:80 --name="fedora20-apache" startx/sv-apache:fc20
	docker run -d -p 50201:3306 --name="fedora20-mariadb" startx/sv-mariadb:fc20
	docker run -d -p 50202:11211 --name="fedora20-memcache" startx/sv-memcache:fc20
	docker run -d -p 50203:27017 --name="fedora20-mongo" startx/sv-mongo:fc20
	docker run -d -p 50204:8000 --name="fedora20-nodejs" startx/sv-nodejs:fc20
	docker run -d -p 50205:80 --name="fedora20-php" startx/sv-php:fc20
	docker run -d -p 50206:5432 --name="fedora20-postgres" startx/sv-postgres:fc20
	docker run -d -p 50208:80 --name="fedora20-pma" startx/app-pma:fc20
	docker run -d -p 50209:80 --name="fedora20-rockmongo" startx/app-rockmongo:fc20

#### Fedora Core 21 container's

	# For Fedora core 21 example, port start from 50300
	docker run -d -it --name="fedora21" startx/fedora:21 bash
	docker run -d -p 50300:80 --name="fedora21-apache" startx/sv-apache:fc21
	docker run -d -p 50301:3306 --name="fedora21-mariadb" startx/sv-mariadb:fc21
	docker run -d -p 50302:11211 --name="fedora21-memcache" startx/sv-memcache:fc21
	docker run -d -p 50303:27017 --name="fedora21-mongo" startx/sv-mongo:fc21
	docker run -d -p 50304:8000 --name="fedora21-nodejs" startx/sv-nodejs:fc21
	docker run -d -p 50305:80 --name="fedora21-php" startx/sv-php:fc21
	docker run -d -p 50306:5432 --name="fedora21-postgres" startx/sv-postgres:fc21
	docker run -d -p 50308:80 --name="fedora21-pma" startx/app-pma:fc21
	docker run -d -p 50309:80 --name="fedora21-rockmongo" startx/app-rockmongo:fc21

#### Fedora Core 22 container's

	# For Fedora core 22 example, port start from 50300
	docker run -d -it --name="fedora22" startx/fedora:22 bash
	docker run -d -p 50600:80 --name="fedora22-apache" startx/sv-apache:fc22
	docker run -d -p 50601:3306 --name="fedora22-mariadb" startx/sv-mariadb:fc22
	docker run -d -p 50602:11211 --name="fedora22-memcache" startx/sv-memcache:fc22
	docker run -d -p 50603:27017 --name="fedora22-mongo" startx/sv-mongo:fc22
	docker run -d -p 50604:8000 --name="fedora22-nodejs" startx/sv-nodejs:fc22
	docker run -d -p 50605:80 --name="fedora22-php" startx/sv-php:fc22
	docker run -d -p 50606:5432 --name="fedora22-postgres" startx/sv-postgres:fc22
	docker run -d -p 50608:80 --name="fedora22-pma" startx/app-pma:fc22
	docker run -d -p 50609:80 --name="fedora22-rockmongo" startx/app-rockmongo:fc22

#### Fedora Core 23 container's

	# For Fedora core 23 example, port start from 50300
	docker run -d -it --name="fedora23" startx/fedora:23 bash
	docker run -d -p 50700:80 --name="fedora23-apache" startx/sv-apache:fc23
	docker run -d -p 50701:3306 --name="fedora23-mariadb" startx/sv-mariadb:fc23
	docker run -d -p 50702:11211 --name="fedora23-memcache" startx/sv-memcache:fc23
	docker run -d -p 50703:27017 --name="fedora23-mongo" startx/sv-mongo:fc23
	docker run -d -p 50704:8000 --name="fedora23-nodejs" startx/sv-nodejs:fc23
	docker run -d -p 50705:80 --name="fedora23-php" startx/sv-php:fc23
	docker run -d -p 50706:5432 --name="fedora23-postgres" startx/sv-postgres:fc23
	docker run -d -p 50708:80 --name="fedora23-pma" startx/app-pma:fc23
	docker run -d -p 50709:80 --name="fedora23-rockmongo" startx/app-rockmongo:fc23

#### CentOS 6 container's

	# For CentOS 6 example, port start from 50400
	docker run -d -it --name="centos6" startx/centos:6 bash
	docker run -d -p 50400:80 --name="centos6-apache" startx/sv-apache:centos6
	docker run -d -p 50401:3306 --name="centos6-mariadb" startx/sv-mariadb:centos6
	docker run -d -p 50402:11211 --name="centos6-memcache" startx/sv-memcache:centos6
	docker run -d -p 50403:27017 --name="centos6-mongo" startx/sv-mongo:centos6
	docker run -d -p 50404:8000 --name="centos6-nodejs" startx/sv-nodejs:centos6
	docker run -d -p 50405:80 --name="centos6-php" startx/sv-php:centos6
	docker run -d -p 50406:5432 --name="centos6-postgres" startx/sv-postgres:centos6
	docker run -d -p 50408:80 --name="centos6-pma" startx/app-pma:centos6
	docker run -d -p 50409:80 --name="centos6-rockmongo" startx/app-rockmongo:centos6

#### CentOS 7 container's

	# For CentOS 7 example, port start from 50500
	docker run -d -it --name="centos7" startx/centos:7 bash
	docker run -d -p 50500:80 --name="centos7-apache" startx/sv-apache:centos7
	docker run -d -p 50501:3306 --name="centos7-mariadb" startx/sv-mariadb:centos7
	docker run -d -p 50502:11211 --name="centos7-memcache" startx/sv-memcache:centos7
	docker run -d -p 50503:27017 --name="centos7-mongo" startx/sv-mongo:centos7
	docker run -d -p 50504:8000 --name="centos7-nodejs" startx/sv-nodejs:centos7
	docker run -d -p 50505:80 --name="centos7-php" startx/sv-php:centos7
	docker run -d -p 50506:5432 --name="centos7-postgres" startx/sv-postgres:centos7
	docker run -d -p 50508:80 --name="centos7-pma" startx/app-pma:centos7
	docker run -d -p 50509:80 --name="centos7-rockmongo" startx/app-rockmongo:centos7

## Build and run from local Dockerfile
### Building docker image
Copy sources in your docker host / build server

	mkdir startx-docker-images; 
	cd startx-docker-images;
	git clone https://github.com/startxfr/docker-images.git .

Build the container

	docker build -t <tag_name> <path_to_Dockerfile>

### Running local image
Running an interactive image and get access to shell

	docker run -it <image_name> <cmd>

Running an image as a daemon

	docker run -d <image_name>
	docker exec -it <image_name> <cmd>

## Related Resources
* [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/)