Singularity containter for postgres-alpine docker image (link).
This singularity recipe modifies from the image to work in service mode.
It also includes an optional /postgresrc
to pass system environment variables.
- To start the service,
singularity instance.start -B host_folder:/var/lib/postgresql/data postgres.img pg-database
. - To pass variables for postgres database, use bind a file to
/postgresrc
.
For example,-B yourrc:/postgresrc
. Some common variables includePGPORT
andHOSTNAME
. (Due to some reason, the default postgres starts in0.0.0.0
. For security reason, this recipe usesHOSTNAME
which defaults tolocalhost
.) - Use
SINGULARITY_BINDPATH='host_folder:container_folder,host_file:container_file'
for easier binding.
To build the image, run sudo singularity build <name.img> Singularity
.
See Singularity
for more info.
The recipes build from many open source projects, including