Postgres compiled and packaged for the Raspberry Pi 2
10K+
See https://hub.docker.com/_/postgres/ for most info
$ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
This image includes EXPOSE 5432 (the postgres port), so standard container linking will make it automatically available to the linked containers. The default postgres user and database are created in the entrypoint with initdb.
$ docker run --name some-app --link some-postgres:postgres -d application-that-uses-postgres
The PostgreSQL image uses several environment variables which are easy to miss. While none of the variables are required, they may significantly aid you in using the image.
POSTGRES_PASSWORDThis environment variable is recommended for you to use the PostgreSQL image. This environment variable sets the superuser password for PostgreSQL. The default superuser is defined by the POSTGRES_USER environment variable. In the above example, it is being set to "mysecretpassword".
POSTGRES_USERThis optional environment variable is used in conjunction with POSTGRES_PASSWORD to set a user and its password. This variable will create the specified user with superuser power and a database with the same name. If it is not specified, then the default user of postgres will be used.
PGDATAThis optional environment variable can be used to define another location - like a subdirectory - for the database files. The default is /var/lib/postgresql/data, but if the data volume you're using is a fs mountpoint (like with GCE persistent disks), Postgres initdb recommends a subdirectory (for example /var/lib/postgresql/data/pgdata ) be created to contain the data.
Content type
Image
Digest
sha256:17d333f62…
Size
96.6 MB
Last updated
almost 11 years ago
docker pull robinthrift/raspbian-postgres