netbox-community / netbox-docker

🐳 Docker Image of NetBox
https://github.com/netbox-community/netbox-docker/wiki
Apache License 2.0
1.81k stars 827 forks source link

Do the housekeeping and worker images need own images? #1328

Open systemcrash opened 1 day ago

systemcrash commented 1 day ago

Current Behavior

Using the current docker-compose.override.yml the current behaviour is to pull in its own images.

Expected Behavior

Should the netbox-worker and netbox-housekeeping also use the same image as netbox?

Docker Compose Version

Docker Compose version v2.26.1

Docker Version

Client: Docker Engine - Community
 Version:           26.0.1
 API version:       1.45
 Go version:        go1.21.9
 Git commit:        d260a54
 Built:             Thu Apr 11 10:54:59 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          26.0.1
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.9
  Git commit:       60b9add
  Built:            Thu Apr 11 10:53:19 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.31
  GitCommit:        e377cd56a71523140ca6ae87e30244719194a521
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

The git Revision

27bf52cf3ea882324273fbabbf23f0af6a194f12

The git Status

clean

Startup Command

docker compose up -d

NetBox Logs

netbox-1  | ⚙️ Applying database migrations
netbox-1  | 🧬 loaded config '/etc/netbox/config/configuration.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/extra.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/logging.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/plugins.py'
netbox-1  | Operations to perform:
netbox-1  |   Apply all migrations: account, auth, circuits, contenttypes, core, dcim, django_rq, extras, ipam, sessions, social_django, taggit, tenancy, users, virtualization, vpn, wireless
netbox-1  | Running migrations:
netbox-1  |   Applying dcim.0191_module_bay_rebuild... OK
netbox-1  | ⚙️ Running trace_paths
netbox-1  | 🧬 loaded config '/etc/netbox/config/configuration.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/extra.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/logging.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/plugins.py'
netbox-1  | Found no missing console port paths; skipping
netbox-1  | Found no missing console server port paths; skipping
netbox-1  | Found no missing interface paths; skipping
netbox-1  | Found no missing power feed paths; skipping
netbox-1  | Found no missing power outlet paths; skipping
netbox-1  | Found no missing power port paths; skipping
netbox-1  | Finished.
netbox-1  | ⚙️ Removing stale content types
netbox-1  | 🧬 loaded config '/etc/netbox/config/configuration.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/extra.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/logging.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/plugins.py'
netbox-1  | ⚙️ Removing expired user sessions
netbox-1  | 🧬 loaded config '/etc/netbox/config/configuration.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/extra.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/logging.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/plugins.py'
netbox-1  | ⚙️ Building search index (lazy)
netbox-1  | 🧬 loaded config '/etc/netbox/config/configuration.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/extra.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/logging.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/plugins.py'
netbox-1  | Reindexing 78 models.
netbox-1  | Indexing models
netbox-1  |   core.datasource... No objects found.
netbox-1  |   core.datafile... No objects found.
netbox-1  |   circuits.circuit... No objects found.
netbox-1  |   circuits.circuitgroup... No objects found.
netbox-1  |   circuits.circuittermination... No objects found.
netbox-1  |   circuits.circuittype... No objects found.
netbox-1  |   circuits.provider... Skipping (found 6 existing).
netbox-1  |   circuits.provideraccount... Skipping (found 4 existing).
netbox-1  |   circuits.providernetwork... No objects found.
netbox-1  |   dcim.cable... No objects found.
netbox-1  |   dcim.consoleport... Skipping (found 7 existing).
netbox-1  |   dcim.consoleserverport... No objects found.
netbox-1  |   dcim.device... Skipping (found 208 existing).
netbox-1  |   dcim.devicebay... No objects found.
netbox-1  |   dcim.devicerole... Skipping (found 32 existing).
netbox-1  |   dcim.devicetype... Skipping (found 71 existing).
netbox-1  |   dcim.frontport... Skipping (found 102 existing).
netbox-1  |   dcim.interface... Skipping (found 677 existing).
netbox-1  |   dcim.inventoryitem... No objects found.
netbox-1  |   dcim.location... Skipping (found 97 existing).
netbox-1  |   dcim.manufacturer... Skipping (found 47 existing).
netbox-1  |   dcim.module... No objects found.
netbox-1  |   dcim.modulebay... Skipping (found 6 existing).
netbox-1  |   dcim.moduletype... Skipping (found 4 existing).
netbox-1  |   dcim.platform... Skipping (found 6 existing).
netbox-1  |   dcim.powerfeed... Skipping (found 1 existing).
netbox-1  |   dcim.poweroutlet... Skipping (found 50 existing).
netbox-1  |   dcim.powerpanel... Skipping (found 1 existing).
netbox-1  |   dcim.powerport... Skipping (found 144 existing).
netbox-1  |   dcim.racktype... No objects found.
netbox-1  |   dcim.rack... Skipping (found 7 existing).
netbox-1  |   dcim.rackreservation... No objects found.
netbox-1  |   dcim.rackrole... Skipping (found 4 existing).
netbox-1  |   dcim.rearport... Skipping (found 102 existing).
netbox-1  |   dcim.region... Skipping (found 3 existing).
netbox-1  |   dcim.site... Skipping (found 3 existing).
netbox-1  |   dcim.sitegroup... Skipping (found 3 existing).
netbox-1  |   dcim.virtualchassis... No objects found.
netbox-1  |   dcim.virtualdevicecontext... No objects found.
netbox-1  |   ipam.aggregate... No objects found.
netbox-1  |   ipam.asn... Skipping (found 3 existing).
netbox-1  |   ipam.asnrange... No objects found.
netbox-1  |   ipam.fhrpgroup... No objects found.
netbox-1  |   ipam.ipaddress... Skipping (found 52 existing).
netbox-1  |   ipam.iprange... Skipping (found 7 existing).
netbox-1  |   ipam.prefix... Skipping (found 35 existing).
netbox-1  |   ipam.rir... Skipping (found 3 existing).
netbox-1  |   ipam.role... No objects found.
netbox-1  |   ipam.routetarget... No objects found.
netbox-1  |   ipam.service... No objects found.
netbox-1  |   ipam.servicetemplate... Skipping (found 4 existing).
netbox-1  |   ipam.vlan... Skipping (found 75 existing).
netbox-1  |   ipam.vlangroup... Skipping (found 6 existing).
netbox-1  |   ipam.vrf... No objects found.
netbox-1  |   extras.customfield... No objects found.
netbox-1  |   extras.journalentry... No objects found.
netbox-1  |   extras.webhook... No objects found.
netbox-1  |   tenancy.contact... Skipping (found 6 existing).
netbox-1  |   tenancy.contactgroup... No objects found.
netbox-1  |   tenancy.contactrole... No objects found.
netbox-1  |   tenancy.tenant... Skipping (found 2 existing).
netbox-1  |   tenancy.tenantgroup... No objects found.
netbox-1  |   virtualization.cluster... Skipping (found 3 existing).
netbox-1  |   virtualization.clustergroup... No objects found.
netbox-1  |   virtualization.clustertype... Skipping (found 4 existing).
netbox-1  |   virtualization.virtualmachine... No objects found.
netbox-1  |   virtualization.vminterface... No objects found.
netbox-1  |   virtualization.virtualdisk... No objects found.
netbox-1  |   vpn.tunnel... No objects found.
netbox-1  |   vpn.ikeproposal... No objects found.
netbox-1  |   vpn.ikepolicy... No objects found.
netbox-1  |   vpn.ipsecproposal... No objects found.
netbox-1  |   vpn.ipsecpolicy... No objects found.
netbox-1  |   vpn.ipsecprofile... No objects found.
netbox-1  |   vpn.l2vpn... No objects found.
netbox-1  |   wireless.wirelesslan... Skipping (found 5 existing).
netbox-1  |   wireless.wirelesslangroup... Skipping (found 2 existing).
netbox-1  |   wireless.wirelesslink... No objects found.
netbox-1  | Completed. Total entries: 1792
netbox-1  | ↩️ Skip creating the superuser
netbox-1  | 🧬 loaded config '/etc/netbox/config/configuration.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/extra.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/logging.py'
netbox-1  | 🧬 loaded config '/etc/netbox/config/plugins.py'
netbox-1  | ✅ Initialisation is done.
netbox-1  | ⏳ Waiting for control socket to be created... (1/10)
netbox-1  | 2024/10/01 15:49:41 [warn] 8#8 Unit is running unprivileged, then it cannot use arbitrary user and group.
netbox-1  | 2024/10/01 15:49:41 [info] 8#8 unit 1.33.0 started
netbox-1  | 2024/10/01 15:49:41 [info] 238#238 discovery started
netbox-1  | 2024/10/01 15:49:41 [notice] 238#238 module: python 3.12.3 "/usr/lib/unit/modules/python3.12.unit.so"
netbox-1  | 2024/10/01 15:49:41 [info] 8#8 controller started
netbox-1  | 2024/10/01 15:49:41 [notice] 8#8 process 238 exited with code 0
netbox-1  | 2024/10/01 15:49:41 [info] 240#240 router started
netbox-1  | 2024/10/01 15:49:41 [info] 240#240 OpenSSL 3.0.13 30 Jan 2024, 300000d0
netbox-1  | ⚙️ Applying configuration from /etc/unit/nginx-unit.json
netbox-1  | 2024/10/01 15:49:42 [info] 243#243 "netbox" prototype started
netbox-1  | 2024/10/01 15:49:42 [info] 244#244 "netbox" application started
netbox-1  | ✅ Unit configuration loaded successfully
netbox-1  | 2024/10/01 15:49:47 [notice] 8#8 process 236 exited with code 0
netbox-1  | 2024/10/01 15:49:53 [info] 278#278 "netbox" application started

Content of docker-compose.override.yml

# version: '3.4'
services:
  netbox:
    # image: docker.io/netboxcommunity/netbox:${VERSION-v3.7-2.8.0}
    # image: ghcr.io/netbox-community/netbox:v3.7-2.8.0
    image: ghcr.io/netbox-community/netbox:${VERSION-v4.1.2-3.0.2}
    ports:
     - 8080:8080
    # environment:
    #  ALLOWED_HOSTS:  10.48.254.5,netbox.ingate.se
    restart: always
  netbox-worker:
    image: ghcr.io/netbox-community/netbox:${VERSION-v4.1.2-3.0.2}
    restart: always
  netbox-housekeeping:
    image: ghcr.io/netbox-community/netbox:${VERSION-v4.1.2-3.0.2}
    restart: always
  postgres:
    restart: always

  # redis
  redis:
    restart: always
  redis-cache:
    restart: always
systemcrash commented 1 day ago

The point being, can those images use:

  netbox-worker:
    image: ghcr.io/netbox-community/netbox:${VERSION-v4.1.2-3.0.2}
...
  netbox-housekeeping:
    image: ghcr.io/netbox-community/netbox:${VERSION-v4.1.2-3.0.2}
...