Closed dauphinpasdroit closed 1 year ago
I have the same problem.
Check this: https://github.com/dainok/netdoc/wiki/NetBox-with-NetDoc-installation#installing-using-docker-compose
Dockerfile-Plugins?
@mamingzhi945
Uploaded: https://github.com/dainok/netdoc/tree/master/docker
According to the example configuration, the following error is still reported:
=> [5/7] COPY configuration/configuration.py /etc/netbox/config/configuration.py 0.1s
=> [6/7] COPY configuration/plugins.py /etc/netbox/config/plugins.py 0.1s
=> ERROR [7/7] RUN SECRET_KEY="dummydummydummydummydummydummydummydummydummydummy" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-in 2.5s
------
> [7/7] RUN SECRET_KEY="dummydummydummydummydummydummydummydummydummydummy" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input:
#0 0.498 🧬 loaded config '/etc/netbox/config/configuration.py'
#0 0.498 🧬 loaded config '/etc/netbox/config/extra.py'
#0 0.498 🧬 loaded config '/etc/netbox/config/logging.py'
#0 0.498 🧬 loaded config '/etc/netbox/config/plugins.py'
#0 2.390 Traceback (most recent call last):
#0 2.390 File "/opt/netbox/netbox/manage.py", line 10, in <module>
#0 2.390 execute_from_command_line(sys.argv)
#0 2.390 File "/opt/netbox/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
#0 2.390 utility.execute()
#0 2.390 File "/opt/netbox/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 386, in execute
#0 2.390 settings.INSTALLED_APPS
#0 2.390 File "/opt/netbox/venv/lib/python3.10/site-packages/django/conf/__init__.py", line 92, in __getattr__
#0 2.390 self._setup(name)
#0 2.390 File "/opt/netbox/venv/lib/python3.10/site-packages/django/conf/__init__.py", line 79, in _setup
#0 2.390 self._wrapped = Settings(settings_module)
#0 2.390 File "/opt/netbox/venv/lib/python3.10/site-packages/django/conf/__init__.py", line 190, in __init__
#0 2.391 mod = importlib.import_module(self.SETTINGS_MODULE)
#0 2.391 File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
#0 2.391 return _bootstrap._gcd_import(name[level:], package, level)
#0 2.391 File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
#0 2.391 File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
#0 2.391 File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
#0 2.391 File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
#0 2.391 File "<frozen importlib._bootstrap_external>", line 883, in exec_module
#0 2.391 File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
#0 2.391 File "/opt/netbox/netbox/netbox/settings.py", line 716, in <module>
#0 2.391 plugin = importlib.import_module(plugin_name)
#0 2.391 File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
#0 2.391 return _bootstrap._gcd_import(name[level:], package, level)
#0 2.391 File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
#0 2.391 File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
#0 2.391 File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
#0 2.391 File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
#0 2.391 File "<frozen importlib._bootstrap_external>", line 883, in exec_module
#0 2.391 File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
#0 2.392 File "/opt/netbox/venv/lib/python3.10/site-packages/netdoc/__init__.py", line 61, in <module>
#0 2.392 shutil.copy(src_file, dst_file)
#0 2.392 File "/usr/lib/python3.10/shutil.py", line 417, in copy
#0 2.392 copyfile(src, dst, follow_symlinks=follow_symlinks)
#0 2.392 File "/usr/lib/python3.10/shutil.py", line 256, in copyfile
#0 2.392 with open(dst, 'wb') as fdst:
#0 2.392 FileNotFoundError: [Errno 2] No such file or directory: '/etc/netbox/scripts/NetDoc.py'
------
failed to solve: executor failed running [/bin/sh -c SECRET_KEY="dummydummydummydummydummydummydummydummydummydummy" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input]: exit code: 1
Do you want netdoc to specify the version?
In the default docker-compose (https://github.com/netbox-community/netbox-docker/blob/release/docker-compose.yml) scripts and reports are under /opt, not under /etc. Which docker-compose are you using?
Are you following the exact steps described here? https://github.com/dainok/netdoc/wiki/NetBox-with-NetDoc-installation#installing-using-docker-compose
In the default docker-compose (https://github.com/netbox-community/netbox-docker/blob/release/docker-compose.yml) scripts and reports are under /opt, not under /etc. Which docker-compose are you using?
Thank you for your reminder, the path to scripts and reports has changed. my original netbox version is 3.2, I upgrade netbox-docker
Hey
I would like to reopen this issue we still have about installing netdoc in a netbox hosted on a docker.
I encountered this error:
While running the command :
docker compose build --no-cache
To deploy the plugin, I've followed this
Here is my Dockerfile-plugin
Here is the plugin_requirements.txt:
And I added this lines in the configuration.py:
If you have any clue...