From: W. Trevor King Date: Fri, 27 Dec 2013 21:43:21 +0000 (-0800) Subject: postgresql/README.md: Mention volume-mounts and setup X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ccfbb533a9ad9b40c6598bd24398ad633b7281fa;p=dockerfile.git postgresql/README.md: Mention volume-mounts and setup Without a host-mounted volume for /var/lib/postgresql I filled up the 10GB dm block allocated by Docker v0.7.2. --- diff --git a/postgresql/README.md b/postgresql/README.md index ea70519..065e6e6 100644 --- a/postgresql/README.md +++ b/postgresql/README.md @@ -46,5 +46,22 @@ You can also access it from unlinked containers: Basically, anyone with access to the `docker0` bridge has access to the client's port. +If you're going to be loading a large database ([devicemapper only +supports 16GB][devicemapper-size-limit]), you may want to +[volume-mount] the database. Grab the configured stuff we'll want to +mount: + + # docker run -d -name postgresql-0 wking/postgresql + # docker cp postgresql-0:/var/lib/postgresql/ /var/lib/ + # mv /var/lib/postgresql/ /var/lib/postgresql-0 + # docker kill postgresql-0 + # docker rm postgresql-0 + +And run future containers with: + + $ docker run -d -name postgresql-0 -v /var/lib/postgresql-0:/var/lib/postgresql wking/postgresql + [PostgreSQL]: http://postgresql.io/ [linking]: http://docs.docker.io/en/latest/use/port_redirection/#linking-a-container +[devicemapper-size-limit]: https://www.kernel.org/doc/Documentation/device-mapper/thin-provisioning.txt +[volume-mount]: http://docs.docker.io/en/latest/use/working_with_volumes/#mount-a-host-directory-as-a-container-volume