mirror of
https://github.com/swissmakers/netbox-plus.git
synced 2026-05-08 23:38:57 +02:00
Add pre-build docker image to docs
Build NetBox Plus multi-arch image and push to Harbor / Docker Hub / build (push) Successful in 23s
Build NetBox Plus multi-arch image and push to Harbor / Docker Hub / build (push) Successful in 23s
This commit is contained in:
@@ -14,9 +14,13 @@ On top of that, NetBox Plus will add Swissmakers improvements such as hardenings
|
||||
|
||||
## Container image
|
||||
|
||||
This repository includes a ready-to-use container definition, based on the **Red Hat Universal Base Image 10 (UBI 10)** so you can run NetBox Plus directly in a hardened, enterprise-friendly base. See the `docker/` directory and `docker-compose.yml` for a full stack (PostgreSQL, Redis, web, workers).
|
||||
This repository includes a **Dockerfile** and **Compose** stack (PostgreSQL, Redis, Gunicorn, RQ workers) based on **Red Hat UBI** (UBI 9 by default; UBI 10 optional on capable CPUs). See `docker/` and `docker-compose.yml`.
|
||||
|
||||
Quick start:
|
||||
### Pre-built image (Swissmakers)
|
||||
|
||||
Official multi-arch builds are published to Docker Hub as **[`swissmakers/netbox-plus`](https://hub.docker.com/repository/docker/swissmakers/netbox-plus)**. Pull with `docker pull swissmakers/netbox-plus:latest` (or another published tag), set `NETBOX_IMAGE=swissmakers/netbox-plus:latest` in `.env`, then from the repo root run `docker compose pull` and `docker compose up -d`. Details: [Docker / Compose install docs](docs/installation/docker.md).
|
||||
|
||||
### Build from source
|
||||
|
||||
```bash
|
||||
cp docker/.env.example .env
|
||||
|
||||
+5
-1
@@ -7,6 +7,10 @@
|
||||
#
|
||||
# UI: http://localhost:8080
|
||||
#
|
||||
# Pre-built image: set NETBOX_IMAGE=swissmakers/netbox-plus:latest in .env, then
|
||||
# podman compose pull && podman compose up -d
|
||||
# https://hub.docker.com/repository/docker/swissmakers/netbox-plus
|
||||
#
|
||||
services:
|
||||
postgres:
|
||||
image: docker.io/library/postgres:16-alpine
|
||||
@@ -42,7 +46,7 @@ services:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
# UBI 10 needs x86-64-v3; UBI 9 is the safe default for older CPUs (see docker/README.md).
|
||||
# UBI 10 needs x86-64-v3; UBI 9 is the default to also support older CPUs (see docker/README.md).
|
||||
BASE_IMAGE: ${NETBOX_BASE_IMAGE:-registry.access.redhat.com/ubi9/ubi:latest}
|
||||
image: ${NETBOX_IMAGE:-netbox-plus:local}
|
||||
restart: unless-stopped
|
||||
|
||||
+4
-3
@@ -31,7 +31,8 @@ NETBOX_PUBLISH_PORT=8080
|
||||
# Django DEBUG (never enable in production). Compose passes NETBOX_DEBUG to the web container.
|
||||
# NETBOX_DEBUG=true
|
||||
|
||||
# NETBOX_IMAGE=netbox-plus:local
|
||||
# NetBox app image: default uses local build tag, to set the Swissmakers pre-built from Docker Hub uncomment:
|
||||
# NETBOX_IMAGE=swissmakers/netbox-plus:latest
|
||||
|
||||
# Optional: UBI 10 only on hosts with x86-64-v3 (otherwise leave unset for UBI 9)
|
||||
# NETBOX_BASE_IMAGE=registry.access.redhat.com/ubi10/ubi:latest
|
||||
# Optional: To use UBI 10 on newer hosts with x86-64-v3 uncomment (otherwise it will use UBI 9)
|
||||
# NETBOX_BASE_IMAGE=registry.access.redhat.com/ubi10/ubi:latest
|
||||
|
||||
+22
-1
@@ -5,7 +5,28 @@ This stack uses:
|
||||
- **Dockerfile**: default `registry.access.redhat.com/ubi9/ubi:latest` (UBI 9) with Python 3.12, dependencies from `requirements.txt`, and Gunicorn. UBI 10 is optional via build-arg (see below).
|
||||
- **docker-compose.yml**: PostgreSQL 16, Redis 7, NetBox web (Gunicorn), and NetBox RQ worker (`high`, `default`, `low` queues).
|
||||
|
||||
## Quick start
|
||||
## Pre-built image (Swissmakers / Docker Hub)
|
||||
|
||||
Swissmakers publishes ready-to-use images to Docker Hub:
|
||||
|
||||
**[hub.docker.com — `swissmakers/netbox-plus`](https://hub.docker.com/repository/docker/swissmakers/netbox-plus)**
|
||||
|
||||
Use them with this Compose file by setting in `.env`:
|
||||
|
||||
```env
|
||||
NETBOX_IMAGE=swissmakers/netbox-plus:latest
|
||||
```
|
||||
|
||||
Then from the repository root:
|
||||
|
||||
```bash
|
||||
docker compose pull netbox
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Use `docker compose up --build` when you want to **build** from the local `Dockerfile` instead of using the registry image.
|
||||
|
||||
## Quick start (build locally)
|
||||
|
||||
```bash
|
||||
cp docker/.env.example .env
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
# Docker / Compose (NetBox Plus)
|
||||
|
||||
NetBox Plus ships a **Dockerfile** and **Compose** stack in the repository root: PostgreSQL 16, Redis 7, Gunicorn (web), and RQ workers. The image is based on **Red Hat UBI** (UBI 9 by default; UBI 10 optional on CPUs that support x86-64-v3).
|
||||
|
||||
## Official pre-built image
|
||||
|
||||
Swissmakers publishes a ready-to-use image to Docker Hub:
|
||||
|
||||
**[swissmakers/netbox-plus on Docker Hub](https://hub.docker.com/repository/docker/swissmakers/netbox-plus)**
|
||||
|
||||
Pull the latest tag (or a specific tag if published):
|
||||
|
||||
```bash
|
||||
docker pull swissmakers/netbox-plus:latest
|
||||
```
|
||||
|
||||
Use it with the bundled Compose file:
|
||||
|
||||
1. Copy the environment template: `cp docker/.env.example .env`
|
||||
2. Set at least `NETBOX_SECRET_KEY`, change admin credentials and modify any host/CSRF values you need.
|
||||
3. Point Compose at the registry image in `.env` like:
|
||||
|
||||
```env
|
||||
NETBOX_IMAGE=swissmakers/netbox-plus:latest
|
||||
```
|
||||
|
||||
4. From the **repository root** (where `docker-compose.yml` lives):
|
||||
|
||||
```bash
|
||||
podman compose pull netbox
|
||||
podman compose up -d
|
||||
```
|
||||
|
||||
After the image is present locally, Compose will use it for both `netbox` and `netbox-worker`. Use `docker compose up --build` only when you intend to **build** the image from the local `Dockerfile` instead of using the pre-built one.
|
||||
|
||||
Open the UI on `http://localhost:8080` (or the host/port you mapped with `NETBOX_PUBLISH_PORT`).
|
||||
|
||||
## Build from source instead
|
||||
|
||||
To build the UBI image locally (same layout as CI):
|
||||
|
||||
```bash
|
||||
cp docker/.env.example .env
|
||||
# edit .env — set NETBOX_SECRET_KEY, superuser vars, etc.
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
Optional: `NETBOX_BASE_IMAGE` for UBI 10 (see repository `docker/README.md`).
|
||||
|
||||
## Further reading
|
||||
|
||||
- Repository **`docker/README.md`**
|
||||
- **LDAP** — [LDAP installation](6-ldap.md) and [Enterprise authentication](../administration/authentication/enterprise-auth.md).
|
||||
@@ -1,27 +1,17 @@
|
||||
# Installation
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
The installation instructions provided here have been tested to work on Rocky Linux 10. The particular commands needed to install dependencies on other distributions may vary significantly. Unfortunately, this is outside the control of the NetBox maintainers. Please consult your distribution's documentation for assistance with any errors.
|
||||
|
||||
- :material-clock-fast:{ .lg .middle } __Eager to Get Started?__
|
||||
For **NetBox Plus** using containers, Swissmakers provides an official image on Docker Hub and a Compose stack in the repository. See **[Docker / Compose (NetBox Plus)](docker.md)** for the pre-built image, pull commands, and how to set `NETBOX_IMAGE`.
|
||||
|
||||
---
|
||||
|
||||
Check out the [NetBox Cloud Free Plan](https://netboxlabs.com/free-netbox-cloud/)! Skip the installation process and grab your own NetBox Cloud instance, preconfigured and ready to go in minutes. Completely free!
|
||||
|
||||
[:octicons-arrow-right-24: Sign Up](https://signup.netboxlabs.com/)
|
||||
|
||||
</div>
|
||||
|
||||
The installation instructions provided here have been tested to work on Ubuntu 24.04. The particular commands needed to install dependencies on other distributions may vary significantly. Unfortunately, this is outside the control of the NetBox maintainers. Please consult your distribution's documentation for assistance with any errors.
|
||||
|
||||
The following sections detail how to set up a new instance of NetBox:
|
||||
The following sections detail how to set up a new instance of NetBox on a Linux host (traditional install):
|
||||
|
||||
1. [PostgreSQL database](1-postgresql.md)
|
||||
2. [Redis](2-redis.md)
|
||||
3. [NetBox components](3-netbox.md)
|
||||
4. [Gunicorn](4a-gunicorn.md) or [uWSGI](4b-uwsgi.md)
|
||||
5. [HTTP server](5-http-server.md)
|
||||
6. [LDAP authentication](6-ldap.md) (optional)
|
||||
6. [LDAP authentication](6-ldap.md)
|
||||
|
||||
## Requirements
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ nav:
|
||||
- Customization: 'features/customization.md'
|
||||
- Installation & Upgrade:
|
||||
- Installing NetBox: 'installation/index.md'
|
||||
- Docker/Podman Compose (NetBox Plus): 'installation/docker.md'
|
||||
- 1. PostgreSQL: 'installation/1-postgresql.md'
|
||||
- 2. Redis: 'installation/2-redis.md'
|
||||
- 3. NetBox: 'installation/3-netbox.md'
|
||||
|
||||
Reference in New Issue
Block a user