Skip to content

Instantly share code, notes, and snippets.

@VictorGob
Last active October 30, 2023 08:46
Show Gist options
  • Save VictorGob/f40cb7ab08499ce7d854c1929e3ca98d to your computer and use it in GitHub Desktop.
Save VictorGob/f40cb7ab08499ce7d854c1929e3ca98d to your computer and use it in GitHub Desktop.
Dockerfile for Postgresql + PLpython3
FROM postgres:12
# Create plpython3u when the db starts.
RUN echo 'CREATE EXTENSION IF NOT EXISTS plpython3u;' > /docker-entrypoint-initdb.d/py3.sql
# Installing last python and plpython3 for current version
RUN apt update && apt install python3 python3-pip postgresql-plpython3-${PG_MAJOR} -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment