Skip to content

[BUG] Build error when creating a Docker image with postgres support #11904

@thiemonipro

Description

@thiemonipro

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

When building a docker image from the dockerfile in this repository, the creation process fails.

Expected Behavior

I would expect the image to be created successfully with the postgres adapter.

Steps To Reproduce

  1. Use the official dockerfile
  2. run docker build --tag <your_tag> --target dbt-postgres <path_to_your_dockerfile>
  3. image build fails, see log output below

Relevant log output

 => ERROR [dbt-postgres 2/2] RUN python -m pip install --no-cache-dir "dbt-postgres @ git+https:  4.2s
------                                                                                                 
 > [dbt-postgres 2/2] RUN python -m pip install --no-cache-dir "dbt-postgres @ git+https://github.com/dbt-labs/dbt-core@main#subdirectory=plugins/postgres":                                                  
0.322 Collecting dbt-postgres@ git+https://github.com/dbt-labs/dbt-core@main#subdirectory=plugins/postgres                                                                                                    
0.322   Cloning https://github.com/dbt-labs/dbt-core (to revision main) to /tmp/pip-install-uo3u17th/dbt-postgres_d682cf2a46da4b75b3e0f9b80f338f7a
0.323   Running command git clone --filter=blob:none --quiet https://github.com/dbt-labs/dbt-core /tmp/pip-install-uo3u17th/dbt-postgres_d682cf2a46da4b75b3e0f9b80f338f7a
4.015   Resolved https://github.com/dbt-labs/dbt-core to commit 3e31117ba1da29c56a80653e3d73247fa6d3ccd7
4.017 ERROR: dbt-postgres@ git+https://github.com/dbt-labs/dbt-core@main#subdirectory=plugins/postgres from git+https://github.com/dbt-labs/dbt-core@main#subdirectory=plugins/postgres does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.
4.140 
4.140 [notice] A new release of pip is available: 24.0 -> 25.2
4.140 [notice] To update, run: pip install --upgrade pip
------
Dockerfile:51
--------------------
  49 |     WORKDIR /usr/app/dbt/
  50 |     
  51 | >>> RUN python -m pip install --no-cache-dir "dbt-postgres @ git+https://github.com/dbt-labs/dbt-core@${commit_ref}#subdirectory=plugins/postgres"
  52 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c python -m pip install --no-cache-dir \"dbt-postgres @ git+https://github.com/dbt-labs/dbt-core@${commit_ref}#subdirectory=plugins/postgres\"" did not complete successfully: exit code: 1

Environment

- OS: mac Sequoia 15.5 (24F74)
- Python: Docker -> 
- dbt: 1.10.6

Which database adapter are you using with dbt?

postgres

Additional Context

The issue seems to occur because the dockerfile still references the old repository structures from when the postgres adapter was still part of the core repository. It seems as if this dockerfile is no longer valid since the adapter has been moved to dbt-adapters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions