From ad73216017f86e1696f62e50b68b6782bdb00a49 Mon Sep 17 00:00:00 2001 From: Irwan Fathurrahman Date: Fri, 23 May 2025 08:44:12 +0700 Subject: [PATCH] Fix psycog error --- docker-osmenrich/Dockerfile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docker-osmenrich/Dockerfile b/docker-osmenrich/Dockerfile index 43dd6a1..bd14f78 100644 --- a/docker-osmenrich/Dockerfile +++ b/docker-osmenrich/Dockerfile @@ -1,11 +1,18 @@ -FROM python:3 +FROM python:3.11 MAINTAINER Irwan Fathurrahman +# Install system dependencies needed to build psycopg2 +RUN apt-get update && apt-get install -y \ + build-essential \ + libpq-dev \ + python3-dev \ + && rm -rf /var/lib/apt/lists/* + ADD requirements.txt /home/requirements.txt -RUN pip3 install -r /home/requirements.txt + +RUN pip3 install --no-binary=psycopg2-binary -r /home/requirements.txt ADD enrich.py /home/ WORKDIR /home -CMD ["python3", "-u", "/home/enrich.py"] - +CMD ["python3", "-u", "/home/enrich.py"] \ No newline at end of file