ITADN

Docker build failing

#598Closedatero645 创建于 2025-07-22
bug
A
atero645commented
Master but also all tag versions are failing to build Docker image of Postgres database with pg_graphql. The commands from docs are failing: `git clone https://github.com/supabase/pg_graphql.git` `cd pg_graphql` `docker-compose up` Error message: `The following packages have unmet dependencies: libpq-dev : Depends: libpq5 (= 15.13-0+deb12u1) but 17.5-1.pgdg120+1 is to be installed E: Unable to correct problems, you have held broken packages. Error: building at STEP "RUN apt-get install -y --no-install-recommends $build_deps pkg-config cmake": while running runtime: exit status 100 ERROR: Service 'db' failed to build : Build failed` <img width="1628" height="289" alt="Image" src="https://github.com/user-attachments/assets/b38d33d3-b858-449d-b77a-947a1a13ea47" /> The root cause is found in the official postgresql images, which provide libpq5 with version 17.5-1.pgdg120+1 too high. There must have been a change in official images I fixed the problem by changing Dockerfile sections to: > ENV build_deps ca-certificates \ > git \ > build-essential \ > libpq-dev=15.13-0+deb12u1 \ > libpq5=15.13-0+deb12u1 \ > postgresql-server-dev-${PG_MAJOR} \ > curl \ > libreadline6-dev \ > zlib1g-dev \ > libssl-dev > > > RUN apt-get install -y --no-install-recommends --allow-downgrades $build_deps pkg-config cmake I needed to change Dockerfile to install proper versions of packages - libpq-dev=15.13-0+deb12u1 - libpq5=15.13-0+deb12u1 and add `--allow-downgrades` flag to apt-get install command
关闭于 2025-09-03 0 条评论