Skip to content

Commit 0b70f72

Browse files
authored
Merge pull request #1387 from netbox-community/develop
Release 3.2.0
2 parents afc10aa + cecfd62 commit 0b70f72

13 files changed

+180
-52
lines changed

.dockerignore

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ docker-compose*
55
env
66
test-configuration
77
.netbox/.git*
8+
.netbox/.pre-commit-config.yaml
9+
.netbox/.readthedocs.yaml
10+
.netbox/.tx
811
.netbox/contrib
912
.netbox/scripts
1013
.netbox/upgrade.sh

.github/ISSUE_TEMPLATE/bug_report.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ body:
4848
id: docker-compose-version
4949
attributes:
5050
label: Docker Compose Version
51-
description: Please paste the output of `docker-compose version`
51+
description: Please paste the output of `docker-compose version` (or `docker compose version`)
5252
placeholder: Docker Compose version vX.Y.Z
5353
validations:
5454
required: true
@@ -139,7 +139,6 @@ body:
139139
description: Please paste the output of `cat docker-compose.override.yml`
140140
render: yaml
141141
placeholder: |
142-
version: '3.4'
143142
services:
144143
netbox:
145144
ports:

.github/workflows/push.yml

+15-9
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,20 @@ concurrency:
1616

1717
jobs:
1818
lint:
19-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-24.04
2020
name: Checks syntax of our code
21+
permissions:
22+
contents: read
23+
packages: read
24+
statuses: write
2125
steps:
2226
- uses: actions/checkout@v4
2327
with:
2428
# Full git history is needed to get a proper
2529
# list of changed files within `super-linter`
2630
fetch-depth: 0
27-
- uses: actions/setup-python@v5
28-
with:
29-
python-version: "3.9"
3031
- name: Lint Code Base
31-
uses: github/super-linter@v7
32+
uses: super-linter/super-linter@v7
3233
env:
3334
DEFAULT_BRANCH: develop
3435
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -57,8 +58,8 @@ jobs:
5758
- ./build.sh feature
5859
- ./build.sh main
5960
os:
60-
- ubuntu-latest
61-
- self-hosted
61+
- ubuntu-24.04
62+
- ubuntu-24.04-arm
6263
fail-fast: false
6364
env:
6465
GH_ACTION: enable
@@ -73,9 +74,14 @@ jobs:
7374
- id: buildx-setup
7475
name: Set up Docker Buildx
7576
uses: docker/setup-buildx-action@v3
77+
- id: arm-install-skopeo
78+
name: Install 'skopeo' on ARM64
79+
if: matrix.os == 'ubuntu-24.04-arm'
80+
run: |
81+
sudo apt-get install -y skopeo
7682
- id: arm-buildx-platform
7783
name: Set BUILDX_PLATFORM to ARM64
78-
if: matrix.os == 'self-hosted'
84+
if: matrix.os == 'ubuntu-24.04-arm'
7985
run: |
8086
echo "BUILDX_PLATFORM=linux/arm64" >>"${GITHUB_ENV}"
8187
- id: docker-build
@@ -85,7 +91,7 @@ jobs:
8591
BUILDX_BUILDER_NAME: ${{ steps.buildx-setup.outputs.name }}
8692
- id: arm-time-limit
8793
name: Set Netbox container start_period higher on ARM64
88-
if: matrix.os == 'self-hosted'
94+
if: matrix.os == 'ubuntu-24.04-arm'
8995
run: |
9096
echo "NETBOX_START_PERIOD=240s" >>"${GITHUB_ENV}"
9197
- id: docker-test

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
platform:
2222
- linux/amd64,linux/arm64
2323
fail-fast: false
24-
runs-on: ubuntu-latest
24+
runs-on: ubuntu-24.04
2525
name: Builds new NetBox Docker Images
2626
env:
2727
GH_ACTION: enable

Dockerfile

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ARG FROM
22
FROM ${FROM} AS builder
33

4+
COPY --from=ghcr.io/astral-sh/uv:0.5 /uv /usr/local/bin/
45
RUN export DEBIAN_FRONTEND=noninteractive \
56
&& apt-get update -qq \
67
&& apt-get upgrade \
@@ -20,24 +21,19 @@ RUN export DEBIAN_FRONTEND=noninteractive \
2021
libxslt-dev \
2122
pkg-config \
2223
python3-dev \
23-
python3-pip \
24-
python3-venv \
25-
&& python3 -m venv /opt/netbox/venv \
26-
&& /opt/netbox/venv/bin/python3 -m pip install --upgrade \
27-
pip \
28-
setuptools \
29-
wheel
24+
&& /usr/local/bin/uv venv /opt/netbox/venv
3025

3126
ARG NETBOX_PATH
3227
COPY ${NETBOX_PATH}/requirements.txt requirements-container.txt /
28+
ENV VIRTUAL_ENV=/opt/netbox/venv
3329
RUN \
3430
# Gunicorn is not needed because we use Nginx Unit
3531
sed -i -e '/gunicorn/d' /requirements.txt && \
3632
# We need 'social-auth-core[all]' in the Docker image. But if we put it in our own requirements-container.txt
3733
# we have potential version conflicts and the build will fail.
3834
# That's why we just replace it in the original requirements.txt.
3935
sed -i -e 's/social-auth-core/social-auth-core\[all\]/g' /requirements.txt && \
40-
/opt/netbox/venv/bin/pip install \
36+
/usr/local/bin/uv pip install \
4137
-r /requirements.txt \
4238
-r /requirements-container.txt
4339

@@ -75,12 +71,13 @@ RUN export DEBIAN_FRONTEND=noninteractive \
7571
unit-python3.12=1.34.1-1~noble \
7672
&& rm -rf /var/lib/apt/lists/*
7773

74+
# Copy the modified 'requirements*.txt' files, to have the files actually used during installation
75+
COPY --from=builder /requirements.txt /requirements-container.txt /opt/netbox/
76+
COPY --from=builder /usr/local/bin/uv /usr/local/bin/
7877
COPY --from=builder /opt/netbox/venv /opt/netbox/venv
7978

8079
ARG NETBOX_PATH
8180
COPY ${NETBOX_PATH} /opt/netbox
82-
# Copy the modified 'requirements*.txt' files, to have the files actually used during installation
83-
COPY --from=builder /requirements.txt /requirements-container.txt /opt/netbox/
8481

8582
COPY docker/configuration.docker.py /opt/netbox/netbox/netbox/configuration.py
8683
COPY docker/ldap_config.docker.py /opt/netbox/netbox/netbox/ldap_config.py
@@ -89,6 +86,7 @@ COPY docker/housekeeping.sh /opt/netbox/housekeeping.sh
8986
COPY docker/launch-netbox.sh /opt/netbox/launch-netbox.sh
9087
COPY configuration/ /etc/netbox/config/
9188
COPY docker/nginx-unit.json /etc/unit/
89+
COPY VERSION /opt/netbox/VERSION
9290

9391
WORKDIR /opt/netbox/netbox
9492

@@ -99,9 +97,11 @@ RUN mkdir -p static /opt/unit/state/ /opt/unit/tmp/ \
9997
&& chmod -R g+w /opt/unit/ media reports scripts \
10098
&& cd /opt/netbox/ && SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/python -m mkdocs build \
10199
--config-file /opt/netbox/mkdocs.yml --site-dir /opt/netbox/netbox/project-static/docs/ \
102-
&& SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
100+
&& DEBUG="true" SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input \
101+
&& mkdir /opt/netbox/netbox/local \
102+
&& echo "build: Docker-$(cat /opt/netbox/VERSION)" > /opt/netbox/netbox/local/release.yaml
103103

104-
ENV LANG=C.utf8 PATH=/opt/netbox/venv/bin:$PATH
104+
ENV LANG=C.utf8 PATH=/opt/netbox/venv/bin:$PATH VIRTUAL_ENV=/opt/netbox/venv UV_NO_CACHE=1
105105
ENTRYPOINT [ "/usr/bin/tini", "--" ]
106106

107107
CMD [ "/opt/netbox/docker-entrypoint.sh", "/opt/netbox/launch-netbox.sh" ]

MAINTAINERS.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Maintainers of _NetBox Docker_
2+
3+
This file lists all currently recognized maintainers of the _NetBox Docker_ project in alphabetical order:
4+
5+
- @cimnine
6+
- @tobiasge
7+
8+
## Stepping Down
9+
10+
Every maintainer is a volunteer and may step down as maintainer at any time without providing any reason.
11+
To make this explicit, the maintainer is asked to update this file.
12+
13+
The last maintainer stepping down is asked to archive the project on GitHub to indicate that the project is no longer maintained.
14+
15+
## Signing up
16+
17+
Everyone is welcome to sign up as maintainer by creating a PR and add their own username to the list.
18+
The current maintainers shall discuss the application.
19+
They may turn down an application if they don't feel confident that the new maintainer is a positive addition.

PRINCIPALS.md

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Development, Maintenance and Community Principals for _NetBox Docker_
2+
3+
These principals shall guide the development and the maintenance of _NetBox Docker_.
4+
5+
## Basic principals
6+
7+
This project is maintained on voluntary basis.
8+
Everyone is asked to respect that.
9+
10+
This means, that …
11+
12+
- … sometimes features are not implemented as fast as one might like -- or not at all.
13+
- … sometimes nobody is looking at bugs, or they are not fixed as fast as one might like -- or not at all.
14+
- … sometimes PRs are not reviewed for an extended period.
15+
16+
Everyone is welcome to provide improvements and bugfixes to the benefit of everyone else.
17+
18+
## Development Principals
19+
20+
The goal of the _NetBox Docker_ project is to provide a container to run the basic NetBox project.
21+
The container should feel like a native container -- as if it were provided by NetBox itself:
22+
23+
- Configuration via environment variables where feasible.
24+
- Except: Whenever a complex type such as a `dict` is required as value of a configuration setting,
25+
then it shall not be provided through an environment variable.
26+
- Configuration of secrets via secret files.
27+
- Log output to standard out (STDOUT/`&1`) / standard error (STDERR/`&2`).
28+
- Volumes for data and cache directories.
29+
- Otherwise, no mounts shall be necessary.
30+
- Runs a non-root user by default.
31+
- One process / role for each instance.
32+
33+
The container generally does not provide more features than the basic NetBox project itself provides.
34+
It may provide additional Python dependencies than the upstream project,
35+
so that all configurable features of NetBox can be used in the container without further modification.
36+
The container may provide helpers, so that it feels and behaves like a native container.
37+
38+
The container does not bundle any community plugins.
39+
40+
## Maintenance Principals
41+
42+
The main goals of maintaining _NetBox Docker_ are:
43+
44+
- Keeping the project at a high quality level.
45+
- Keeping the maintenance effort minimal.
46+
- Coordinating development efforts.
47+
48+
The following guidelines help us to achieve these goals:
49+
50+
- As many maintenance tasks as possible shall be automated or scripted.
51+
- All manual tasks must be documented.
52+
- All changes are reviewed by at least one maintainer.
53+
- Changes of maintainers are reviewed by at least one other maintainer.
54+
(Except if there's only one maintainer left.)
55+
- The infrastructure beyond what GitHub provides shall be kept to a minimum.
56+
- On request, every maintainer shall get access to infrastructure that is beyond GitHub
57+
(at the time of writing that's _Docker Hub_ and _Quay_ in particular).
58+
59+
## Community Principals
60+
61+
This project is developed by the NetBox community for the NetBox community.
62+
We welcome contributions, as long as they are in line with the principals above.
63+
64+
The maintainers of NetBox Docker are not the support team.
65+
The community is expected to help each other out.
66+
67+
Always remember:
68+
Behind every screen (or screen-reader) on the other end is a fellow human.
69+
Be nice and respectful, thankful for help,
70+
and value ideas and contributions,
71+
even when they don't fit the goals.

0 commit comments

Comments
 (0)