View on GitHub

NYU DevOps Troubleshooting Guide

A guide to troubleshooting common issues in the NYU DevOps class

Docker Issues


Problem Statement: Docker build fails due to psycopg2 issue

While attempting to build a Docker image, the process fails when trying to install the psycopg2 package, indicating that pg_config is missing. The user has verified that the requirements.txt matches the one provided in the TDD lab, yet the issue persists.

Solution:

Update Dockerfile to include RUN apt-get update && apt-get install -y postgresql-client on Line 23 which are required to build the psycopg2 package.

Alternatively, switch to using the binary package psycopg[binary] to avoid the need for compiling the package and installing additional dependencies.