Skip to content

[Docs/Website] Update the dockerignore file #43

@nat3058

Description

@nat3058

Is there an existing issue for this?

  • I have searched the existing issues

Description

Summary

The Docker build (docker build . -f Dockerfile-dev) fails for contributors who follow the project's recommended native setup guide. The build stops at the COPY . . step with a no space left on device error.

Root Cause

The issue stems from a mismatch between the project's documentation and the .dockerignore file:

  1. The recommended native setup guide uses uv, which creates a virtual environment directory named .venv.
  2. The current .dockerignore file contains the pattern venv*/, which is intended to exclude virtual environments.
  3. This pattern does not match .venv/ due to the leading dot.

Consequently, the entire multi-gigabyte .venv directory is copied into the build context, causing the build to run out of space. This also bloats the final image with redundant, platform-specific binaries, which is against Docker best practices.

Proposed Solution

Update the .dockerignore file to correctly exclude the virtual environment created by uv and improve its robustness by including other common directory names.

Recommended .dockerignore content:

# Python cache
*.pyc
__pycache__/

# Git / IDE / OS files
.git/
.idea/
.vscode/
.directory

# Python virtual environments (covers uv, venv, etc.)
.venv*/
venv*/

This simple fix will resolve the build failure and ensure a cleaner, more efficient Docker build process for all contributors.

Alternatively, we can also change option 2b in the python native env setup docs to name the venv directory as ".venv" instead of "venv" and then modify the dockerignore accordingly.

Affected Areas

  • Documentation files (docs/)
  • Website content (website/)

Proposed Changes

No response

Additional Context

No response

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions