postgresql: Add PostgreSQL container instructions (Dockerfile and README)
[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 markers
7 with values while generating a `Dockerfile` from each
8 `Dockerfile.template`, and then builds each tag with:
9
10     $ docker build -t $NAMESPACE/$REPO:$TAG $REPO
11
12 for example:
13
14     $ docker build -t wking/gentoo-en-us:20131205 gentoo-en-us
15
16 The dependency graph is:
17
18     wking/gentoo  (amd64 stage3)
19     `-- gentoo-portage  (adds portage directory)
20         `-- gentoo-en-us  (adds locale)
21             `-- gentoo-syslog  (adds syslog-ng and associates)
22                 |-- buildbot  (adds a Buildbot master and slave)
23                 |-- postgresql  (adds PostgreSQL)
24                 `-- redis  (adds Redis)
25
26 Run:
27
28     $ ./build.sh
29
30 to seed from the Gentoo mirrors and build all images.  There are a
31 number of variables in the `build.sh` script that configure the build
32 (`AUTHOR`, `NAMESPACE`, …).  We use [POSIX parameter
33 expansion][parameter-expansion] to make it easy to override variables
34 as you see fit.
35
36     $ NAMESPACE=jdoe DATE=20131210 ./build.sh
37
38 I'd like to avoid bloating the images with the Portage tree, but
39 without ugly hacks [that is not currently possible][3156] is mounted
40 from the host.
41
42 [Docker]: http://www.docker.io/
43 [Dockerfiles]: http://www.docker.io/learn/dockerfile/
44 [Gentoo]: http://www.gentoo.org/
45 [parameter-expansion]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
46 [3156]: https://github.com/dotcloud/docker/issues/3156