-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Closed
Copy link
Labels
Description
Bug description
I am currently unable to build the Dockerfile.nginx-alpine Image on the dev branch using:
docker/setEnv.sh dev
docker compose build
Expected behavior
This Image should build.
Logs
> [nginx collectstatic 8/8] RUN env DD_SECRET_KEY='.' DD_DJANGO_DEBUG_TOOLBAR_ENABLED=True python3 manage.py collectstatic --noinput --verbosity=2 && true:
1.000 Traceback (most recent call last):
1.000 File "/app/manage.py", line 10, in <module>
1.000 execute_from_command_line(sys.argv)
1.000 File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
1.000 utility.execute()
1.000 File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 416, in execute
1.000 django.setup()
1.000 File "/usr/local/lib/python3.12/site-packages/django/__init__.py", line 24, in setup
1.000 apps.populate(settings.INSTALLED_APPS)
1.000 File "/usr/local/lib/python3.12/site-packages/django/apps/registry.py", line 91, in populate
1.000 app_config = AppConfig.create(entry)
1.000 ^^^^^^^^^^^^^^^^^^^^^^^
1.000 File "/usr/local/lib/python3.12/site-packages/django/apps/config.py", line 193, in create
1.000 import_module(entry)
1.001 File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
1.001 return _bootstrap._gcd_import(name[level:], package, level)
1.001 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1.001 File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
1.001 File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
1.001 File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
1.001 ModuleNotFoundError: No module named 'debug_toolbar'
------
Dockerfile.nginx-alpine:55
Additional context (optional)
The dependency django-debug-toolbar is only included in requirements-dev.txt which seems to be not included in the nginx image. Bug was likely introduced in #12921 by enabling it by default. If i disable it in the overwrite (for dev) everything builds fine.