Skip to content

Django container complains "error walking file system" when venv is installed #3083

@jmoppel

Description

@jmoppel

What happened?

After creating a fresh project, and then docker-compose build and up, The Django Docker container infinitely complains "error walking file system".

What should've happened instead?

The Django container should start without any errors.

Additional details

This happens if you have a Python venv environment installed anywhere inside the project directory. The problem is, inside the docker container, venv symlinks to files that don't exist in the container (e.g. /usr/bin/python3.8). I have a venv to test changes to requirements locally instead of waiting for a docker-compose build to fail (which takes a lot longer).

Steps to reproduce

Inside a new or existing cookiecutter project directory

docker-compose -f local.yml build
docker-compose -f local.yml up

Stop the containers (ctrl-c). Now, create a new python venv

python -m venv venv

Now bring up your containers and the Django Container will constantly complain "error walking file system":

docker-compose -f local.yml up

I assume this is watchgod complaining. Let me know if this is correct or not.

If you're open to a fix for this issue, I'll open a pull request to update the Dockerfile and fix this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions