salt: Add a generic Salt image to be shared between minion and master images
[dockerfile.git] / README.md
1 [Dockerfiles][] for assorted [Gentoo][]-based [Docker][] images.
2
3 Dockerfiles are sorted into directories with names matching the
4 suggested repository.  To avoid duplicating ephemeral data (namespace,
5 timestamp tag, …), they appear in the `Dockerfile.template` as markers
6 (`${NAMESPACE}`, `${TAG}`, …).  The `build.sh` script replaces the
7 markers with values while generating a `Dockerfile` from each
8 `Dockerfile.template` (using [envsubst][]), and then builds each tag
9 with:
10
11     $ docker build -t $NAMESPACE/$REPO:$TAG $REPO
12
13 for example:
14
15     $ docker build -t wking/gentoo-en-us:20131205 gentoo-en-us
16
17 The dependency graph is:
18
19     wking/gentoo  (amd64 stage3)
20     `-- gentoo-portage  (adds portage directory)
21         `-- gentoo-python (drops Python 2.7)
22             `-- gentoo-utc  (adds a system timezone)
23                 `-- gentoo-en-us  (adds locale)
24                     `-- gentoo-openrc  (configure OpenRC for Docker)
25                         `-- gentoo-syslog  (adds syslog-ng and associates)
26                             |-- buildbot  (adds a Buildbot master and slave)
27                             |-- docker-registry  (adds a Docker registry server)
28                             |-- gentoo-layman  (adds layman for Gentoo overlays)
29                             |   `-- package-cache  (adds a package-cache proxy)
30                             |-- gentoo-node  (adds Node and npm)
31                             |   `-- hubot  (adds hubot with an IRC adapter)
32                             |-- irker  (adds irker, and spawns irkerd by default)
33                             |-- memcached  (adds Memcached)
34                             |-- nagios  (adds Nagios)
35                             |-- nginx  (adds Nginx)
36                             |   |-- nginx-proxy  (SSL/TLS proxying via SNI)
37                             |   |-- kibana  (adds Kibana)
38                             |   `-- kibana-azure  (adds Azure's Kibana)
39                             |-- ngircd  (adds ngIRCd)
40                             |-- postgresql  (adds PostgreSQL)
41                             |-- redis  (adds Redis)
42                             |-- salt  (adds a Salt Stack install)
43                             |   `-- salt-minion  (enables a Salt Stack minion)
44                             |-- stunnel  (adds stunnel)
45                             |-- thumbor  (adds Thumbor)
46                             `-- gentoo-java  (adds IcedTea)
47                                 `-- elasticsearch  (adds Elasticsearch)
48
49 Run:
50
51     $ ./build.sh
52
53 to seed from the Gentoo mirrors and build all images.  There are a
54 number of variables in the `build.sh` script that configure the build
55 (`AUTHOR`, `NAMESPACE`, …).  We use [POSIX parameter
56 expansion][parameter-expansion] to make it easy to override variables
57 as you see fit.
58
59     $ NAMESPACE=jdoe DATE=20131210 ./build.sh
60
61 I'd like to avoid bloating the images with the Portage tree, but
62 without ugly hacks [that is not currently possible][3156].
63
64 [Docker]: http://www.docker.io/
65 [Dockerfiles]: http://www.docker.io/learn/dockerfile/
66 [Gentoo]: http://www.gentoo.org/
67 [envsubst]: http://www.gnu.org/software/gettext/manual/html_node/envsubst-Invocation.html
68 [parameter-expansion]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
69 [3156]: https://github.com/dotcloud/docker/issues/3156