Run update.sh

This commit is contained in:
Docker Library Bot 2016-03-14 14:45:24 -07:00
parent 9677d781d7
commit cffc043633
2 changed files with 16 additions and 3 deletions

View File

@ -71,6 +71,19 @@ This optional environment variable can be used to define a different name for th
If you would like to do additional initialization in an image derived from this one, add one or more `*.sql` or `*.sh` scripts under `/docker-entrypoint-initdb.d` (creating the directory if necessary). After the entrypoint calls `initdb` to create the default `postgres` user and database, it will run any `*.sql` files and source any `*.sh` scripts found in that directory to do further initialization before starting the service. If you would like to do additional initialization in an image derived from this one, add one or more `*.sql` or `*.sh` scripts under `/docker-entrypoint-initdb.d` (creating the directory if necessary). After the entrypoint calls `initdb` to create the default `postgres` user and database, it will run any `*.sql` files and source any `*.sh` scripts found in that directory to do further initialization before starting the service.
For example, to add an additional user and database, add the following to `/docker-entrypoint-initdb.d/init-user-db.sh`:
```bash
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
CREATE USER docker;
CREATE DATABASE docker;
GRANT ALL PRIVILEGES ON DATABASE docker TO docker;
EOSQL
```
These initialization files will be executed in sorted name order as defined by the current locale, which defaults to `en_US.utf8`. Any `*.sql` files will be executed by `POSTGRES_USER`, which defaults to the `postgres` superuser. It is recommended that any `psql` commands that are run inside of a `*.sh` script be executed as `POSTGRES_USER` by using the `--username "$POSTGRES_USER"` flag. This user will be able to connect without a password due to the presence of `trust` authentication for Unix socket connections made inside the container. These initialization files will be executed in sorted name order as defined by the current locale, which defaults to `en_US.utf8`. Any `*.sql` files will be executed by `POSTGRES_USER`, which defaults to the `postgres` superuser. It is recommended that any `psql` commands that are run inside of a `*.sh` script be executed as `POSTGRES_USER` by using the `--username "$POSTGRES_USER"` flag. This user will be able to connect without a password due to the presence of `trust` authentication for Unix socket connections made inside the container.
You can also extend the image with a simple `Dockerfile` to set a different locale. The following example will set the default locale to `de_DE.utf8`: You can also extend the image with a simple `Dockerfile` to set a different locale. The following example will set the default locale to `de_DE.utf8`:

View File

@ -2,10 +2,10 @@
- [`8.1.4`, `8.1` (*8.1/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/642b1b8906851708cc309ac2af71033ac260f32e/8.1/Dockerfile) - [`8.1.4`, `8.1` (*8.1/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/642b1b8906851708cc309ac2af71033ac260f32e/8.1/Dockerfile)
- [`8.1.4-onbuild`, `8.1-onbuild` (*8.1/onbuild/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/6870e0f6469f2c17f00d25324311df5d46a2791c/8.1/onbuild/Dockerfile) - [`8.1.4-onbuild`, `8.1-onbuild` (*8.1/onbuild/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/6870e0f6469f2c17f00d25324311df5d46a2791c/8.1/onbuild/Dockerfile)
- [`8.2.2`, `8.2`, `8`, `latest` (*8.2/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/642b1b8906851708cc309ac2af71033ac260f32e/8.2/Dockerfile) - [`8.2.3`, `8.2`, `8`, `latest` (*8.2/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/445f76edb8edacfa8e0010df7b2881119a29b4a5/8.2/Dockerfile)
- [`8.2.2-onbuild`, `8.2-onbuild`, `8-onbuild`, `onbuild` (*8.2/onbuild/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/1ef759405e541ac9552fb92f2f293c8496e10d07/8.2/onbuild/Dockerfile) - [`8.2.3-onbuild`, `8.2-onbuild`, `8-onbuild`, `onbuild` (*8.2/onbuild/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/1ef759405e541ac9552fb92f2f293c8496e10d07/8.2/onbuild/Dockerfile)
[![](https://badge.imagelayers.io/sentry:latest.svg)](https://imagelayers.io/?images=sentry:8.1.4,sentry:8.1.4-onbuild,sentry:8.2.2,sentry:8.2.2-onbuild) [![](https://badge.imagelayers.io/sentry:latest.svg)](https://imagelayers.io/?images=sentry:8.1.4,sentry:8.1.4-onbuild,sentry:8.2.3,sentry:8.2.3-onbuild)
For more information about this image and its history, please see [the relevant manifest file (`library/sentry`)](https://github.com/docker-library/official-images/blob/master/library/sentry). This image is updated via pull requests to [the `docker-library/official-images` GitHub repo](https://github.com/docker-library/official-images). For more information about this image and its history, please see [the relevant manifest file (`library/sentry`)](https://github.com/docker-library/official-images/blob/master/library/sentry). This image is updated via pull requests to [the `docker-library/official-images` GitHub repo](https://github.com/docker-library/official-images).