|
1 | 1 | FROM ubuntu:20.04 |
| 2 | +MAINTAINER docker@postgresml.com |
| 3 | + |
2 | 4 | RUN apt-get update |
3 | 5 | ARG DEBIAN_FRONTEND=noninteractive |
4 | 6 | ENV TZ=Etc/UTC |
5 | 7 | RUN apt-get install -y postgresql-plpython3-12 python3 python3-pip postgresql-12 tzdata sudo |
| 8 | + |
6 | 9 | COPY --chown=postgres:postgres . /app |
7 | 10 | WORKDIR /app/pgml |
| 11 | + |
| 12 | +# Install pgml extension globally. |
8 | 13 | RUN python3 setup.py install |
| 14 | + |
| 15 | +# Listen on 0.0.0.0 and allow 'root' to connect without a password. |
| 16 | +# Please modify for production deployments accordingly. |
9 | 17 | RUN cp /app/docker/postgresql.conf /etc/postgresql/12/main/postgresql.conf |
10 | 18 | RUN cp /app/docker/pg_hba.conf /etc/postgresql/12/main/pg_hba.conf |
| 19 | + |
11 | 20 | WORKDIR /app |
12 | 21 | ENTRYPOINT ["/bin/bash","/app/docker/entrypoint.sh"] |