dbt-labs / dbt-labs/dbt

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

Open
#11,904 3 comments 0 reactions 0 assignees View on GitHub
engine:v1 type:bug
Dominant language
Rust
Stars
13.8k
Forks
2.6k
Avg merge
21h 31m
Merged PRs (30d)
56

Description

### Is this a new bug in dbt-core?

- [x] I believe this is a new bug in dbt-core
- [x] 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](https://github.com/dbt-labs/dbt-core/blob/v1.10.6/docker/Dockerfile), 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 --target dbt-postgres `
3. image build fails, see log output below

### Relevant log output

```shell
=> 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

```markdown
- 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](https://github.com/dbt-labs/dbt-adapters).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.