gentoo-portage/Dockerfile.template: Use 'webrsync --revert'
[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-utc  (adds a system timezone)
22             `-- gentoo-en-us  (adds locale)
23                 `-- gentoo-syslog  (adds syslog-ng and associates)
24                     |-- buildbot  (adds a Buildbot master and slave)
25                     |-- docker-registry  (adds a Docker registry server)
26                     |-- gentoo-layman  (adds layman for Gentoo overlays)
27                     |   `-- package-cache  (adds a package-cache proxy)
28                     |-- gentoo-node  (adds Node and npm)
29                     |   `-- hubot  (adds hubot with an IRC adapter)
30                     |-- irker  (adds irker, and spawns irkerd by default)
31                     |-- memcached  (adds Memcached)
32                     |-- nginx  (adds Nginx)
33                     |   |-- nginx-proxy  (SSL/TLS proxying via SNI)
34                     |   |-- kibana  (adds Kibana)
35                     |   `-- kibana-azure  (adds Azure's Kibana)
36                     |-- ngircd  (adds ngIRCd)
37                     |-- postgresql  (adds PostgreSQL)
38                     |-- redis  (adds Redis)
39                     |-- salt-minion  (adds a Salt Stack minion)
40                     |-- stunnel  (adds stunnel)
41                     `-- gentoo-java  (adds IcedTea)
42                         `-- elasticsearch  (adds Elasticsearch)
43
44 Run:
45
46     $ ./build.sh
47
48 to seed from the Gentoo mirrors and build all images.  There are a
49 number of variables in the `build.sh` script that configure the build
50 (`AUTHOR`, `NAMESPACE`, …).  We use [POSIX parameter
51 expansion][parameter-expansion] to make it easy to override variables
52 as you see fit.
53
54     $ NAMESPACE=jdoe DATE=20131210 ./build.sh
55
56 I'd like to avoid bloating the images with the Portage tree, but
57 without ugly hacks [that is not currently possible][3156].
58
59 [Docker]: http://www.docker.io/
60 [Dockerfiles]: http://www.docker.io/learn/dockerfile/
61 [Gentoo]: http://www.gentoo.org/
62 [envsubst]: http://www.gnu.org/software/gettext/manual/html_node/envsubst-Invocation.html
63 [parameter-expansion]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
64 [3156]: https://github.com/dotcloud/docker/issues/3156