sjm-steffann / netbox-ddns

Dynamic DNS Connector for NetBox
Apache License 2.0
94 stars 18 forks source link

Installation steps not applicable for Netbox Docker setup #23

Open eberbrenes opened 2 years ago

eberbrenes commented 2 years ago

upgrade.sh will fail with dependencies error when running netbox-docker (gcc related). Also no systemctl is included on Alpine docker image from main build https://github.com/netbox-community/netbox-docker

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [7 lines of output] /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find Scrt1.o: No such file or directory /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find crti.o: No such file or directory /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lssp_nonshared collect2: error: ld returned 1 exit status sys.argv ['/tmp/pip-install-8azecwv0/ruamel-yaml-clib_499f18dc73c743ea86e47acc6c498bf1/setup.py', 'egg_info', '--egg-base', '/tmp/pip-pip-egg-info-249cq7qa'] test compiling /tmp/tmp_ruamel_9j_rnwv4/test_ruamel_yaml.c -> test_ruamel_yaml link error /tmp/tmp_ruamel_9j_rnwv4/test_ruamel_yaml.c Exception: command '/usr/bin/gcc' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

aodix commented 2 years ago

in you docker compose you need to add the command to trigger the update on the worker. Afterward you tables should be generated. Small example for docker-compose.override.yml

version: '3.4' netbox-worker: command:

  • /opt/netbox/venv/bin/python
  • /opt/netbox/netbox/manage.py
  • rqworker
a-belhadj commented 1 year ago

It works fine for me, here is my Dockerfile:

FROM netboxcommunity/netbox:latest-2.2.0
RUN /opt/netbox/venv/bin/python3 -m pip install --upgrade pip setuptools

#netbox_ddns
RUN apt update 
RUN apt install git --yes
RUN /opt/netbox/venv/bin/pip install --no-warn-script-location git+https://github.com/sjm-steffann/netbox-ddns@31c511b3e1e8f4939c1aba424bdc8194eaa1b85a