I have a problem with adding pg_cron extension to the postgres: 13.4-alpine3.14 docker image and I totally stuck on it: /
What I was trying to do: I performed a simple Dockerfile to build an image with the needed extension:
FROM postgres:13.4-alpine3.14
RUN apk add --update pg_cron
I ran the container firstly with the default config, to check if the extension has been installed properly, and I get:
bash-5.1# apk list | grep cron
postgresql-pg_cron-1.3.1-r0 x86_64 {postgresql-pg_cron} (PostgreSQL) [installed]
so it looks like the extension has been properly installed inside the container. But when I mount the postgres config that is needed for launching newly extension (including shared_preload_libraries = 'pg_cron')
docker run -d --name pg_test -v ${PWD}/postgresql.conf:/etc/postgres.conf -e POSTGRES_PASSWORD=PASSWD local/postgres:13.4-alpine3.14-pgcron postgres -c config_file=/etc/postgres.conf
the container is crashing and I see in logs below message:
could not access file "pg_cron": no such file or directory
Maybe someone has any ideas about what am I doing wrong? Thanks in advance.