HUB
Sign inSign up

joellduerksen/postgres-rdkit

By joellduerksen

•Updated about 4 years ago

PostgreSQL w/RDKit cartridge

Image
2

149

joellduerksen/postgres-rdkit repository overview

⁠PostgreSQL 12, w/RDKit cartridge

This docker image starts with the postgres image, and installs the RDKit Cartridge. The build file is available for review at github postgres-rdkit⁠. If something doesn't work as expected, or if you identify an improvement in the build let me know in the github project⁠ by submitting a pull request or issue...

⁠Notes

  • Built for my use to move an application up to 2022_03_4 release, and is a drop in replacement in my case. I've run some tests, seems solid, so far.
  • Let me know in github if run into any issues, or identify an improvement..

⁠Basic terse use

docker run --name myname -p 5432:5432 -e POSTGRES_PASSWORD=mypassword -d joellduerksen/postgres-rdkit:Release_2022_03_4

⁠More advanced and verbose example showing

  • run docker as current user instead of root
  • shared memory setting
  • a health check
  • illustrate how to pass in a few postgres configuration settings (a trimmed down snippet from one of my scripts)
# set required variables in advance (e.g. source from a file), e.g.
MYDOCKER_IMAGE="joellduerksen/postgres-rdkit:Release_2022_03_4"

docker run \
    --user $(id -u):$(id -g) \
    --name "${MYDOCKERNAME}" \
    --shm-size="${SHM_SIZE}" \
    --detach \
    --restart unless-stopped \
    --log-driver json-file --log-opt max-size=10m --log-opt max-file=3 \
    --volume ${MOUNT_DRIVE_DIR}:/data \
    --mount type=bind,src=${MYDOCKER_DIR},dst=${PGDATA} \
    --env POSTGRES_USER=${POSTGRES_USER} \
    --env POSTGRES_PASSWORD=${POSTGRES_PASSWORD} \
    --env POSTGRES_DB=${POSTGRES_DB} \
    --publish ${POSTGRES_PORT}:5432/tcp \
    --health-cmd="( (pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}) && (echo 'SELECT 1;' | psql -U ${POSTGRES_USER} -d ${POSTGRES_DB}) ) || exit 1" \
    --health-timeout=3s \
    --health-retries=60 \
    --health-interval=6s \
    ${MYDOCKER_IMAGE} \
    -c effective_cache_size="${EFFECTIVE_CACHE_SIZE}" \
    -c full_page_writes=off \
    -c maintenance_work_mem="${MAINTENANCE_WORK_MEM}" \
    -c max_connections=${MAX_CONNECTIONS} \
    -c max_parallel_maintenance_workers="${MAX_PARALLEL_MAINTENANCE_WORKERS}" \
    -c max_parallel_workers="${MAX_PARALLEL_WORKERS}" \
    -c max_parallel_workers_per_gather="${MAX_PARALLEL_WORKERS_PER_GATHER}" \
    -c max_worker_processes="${MAX_WORKER_PROCESSES}" \
    -c pg_prewarm.autoprewarm=true \
    -c random_page_cost=1.1 \
    -c shared_buffers="${SHARED_BUFFERS}" \
    -c shared_preload_libraries='pg_prewarm' \
    -c work_mem=${WORK_MEM}

Tag summary

Content type

Image

Digest

sha256:29834481e…

Size

252.4 MB

Last updated

about 4 years ago

docker pull joellduerksen/postgres-rdkit:Release_2022_03_4