From c11718fce10b49ac11d861a35afe37ba20409ddc Mon Sep 17 00:00:00 2001 From: bboerni2 <93215657+bboerni2@users.noreply.github.com> Date: Tue, 23 Sep 2025 16:59:45 +0200 Subject: [PATCH] Refactor netbox service in docker-compose.override.yml to include build context and Dockerfile, and remove unnecessary logging configuration --- Dockerfile-plugins | 11 +++++++++++ docker-compose.override.yml | 16 ++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 Dockerfile-plugins diff --git a/Dockerfile-plugins b/Dockerfile-plugins new file mode 100644 index 0000000..de678c2 --- /dev/null +++ b/Dockerfile-plugins @@ -0,0 +1,11 @@ +# Dockerfile-plugins +ARG FROM_TAG=v4.4-3 +FROM ghcr.io/netbox-community/netbox:${FROM_TAG}-plugins + +# Systemabhängigkeit: pip ins venv holen +RUN python -m ensurepip && \ + /opt/netbox/venv/bin/python -m pip install --upgrade pip + +# Plugins installieren +COPY requirements-plugins.txt /plugins/requirements-plugins.txt +RUN /opt/netbox/venv/bin/python -m pip install --no-cache-dir -r /plugins/requirements-plugins.txt diff --git a/docker-compose.override.yml b/docker-compose.override.yml index bf5f667..6aa119e 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -1,18 +1,14 @@ services: netbox: + build: + context: . + dockerfile: Dockerfile-plugins + args: + FROM_TAG: v4.4-3 + image: bboerni2/netbox:v4.4-3-plugins ports: - "8000:8080" restart: unless-stopped - logging: - driver: "json-file" - options: - max-size: "10m" - max-file: "3" - volumes: - - ./requirements-plugins.txt:/plugins/requirements-plugins.txt:ro - command: > - sh -lc "/opt/netbox/venv/bin/python -m pip install --no-cache-dir -r /plugins/requirements-plugins.txt - && /opt/netbox/docker-entrypoint.sh" netbox-worker: restart: unless-stopped