Closed Skyhikeeper closed 1 year ago
I think it is just installing the package and creating the extension:
FROM posgres:version
RUN set -eux; \
apt-get update; \
apt-get install -y pgagent; \
rm -rf /var/lib/apt/lists/*; \
echo 'CREATE EXTENSION pgagent;' > /docker-entrypoint-initdb.d/pgadmin.sql; \
chown postgres:postgres /docker-entrypoint-initdb.d/pgadmin.sql
But I am unsure where the pgagent
binary comes in. Maybe a second container is needed to run the agent? docker run -d custom-pg-image pgagent -f hostaddr=[postgres-dns-name-or-ip] dbname=postgres user=postgres
https://www.pgadmin.org/docs/pgadmin4/development/pgagent_install.html
For further help, I would suggest trying a dedicated support forum, such as the Docker Community Slack, Server Fault, Unix & Linux, or Stack Overflow.
How would I go about adding PgAgent to the latest docker image so that It can support scheduling?.