Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ RUN export DEBIAN_FRONTEND=noninteractive \
libsasl2-dev \
libssl-dev \
libxml2-dev \
libxmlsec1 \
libxmlsec1-1 \
libxmlsec1-dev \
libxmlsec1-openssl \
libxmlsec1-openssl1 \
libxslt-dev \
pkg-config \
python3-dev \
Expand Down Expand Up @@ -57,20 +57,20 @@ RUN export DEBIAN_FRONTEND=noninteractive \
curl \
libldap-common \
libpq5 \
libxmlsec1-openssl \
libxmlsec1-openssl1 \
openssh-client \
openssl \
python3 \
tini \
&& rm -rf /var/lib/apt/lists/*

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

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

COPY docker/configuration.docker.py /opt/netbox/netbox/netbox/configuration.py
COPY docker/ldap_config.docker.py /opt/netbox/netbox/netbox/ldap_config.py
Expand All @@ -89,8 +89,8 @@ RUN useradd --home-dir /opt/netbox/ --no-create-home --no-user-group --system --
&& mkdir -p static media local \
&& chown -R netbox:root media reports scripts \
&& chmod -R g+w media reports scripts \
&& cd /opt/netbox/ && SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/python -m mkdocs build \
--config-file /opt/netbox/mkdocs.yml --site-dir /opt/netbox/netbox/project-static/docs/ \
&& cd /opt/netbox/ && SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/zensical build \
--config-file /opt/netbox/mkdocs.yml \
&& DEBUG="true" SECRET_KEY="dummyKeyWithMinimumLength-------------------------" /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input \
&& echo "build: Docker-$(cat /opt/netbox/VERSION)" > /opt/netbox/netbox/local/release.yaml

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.2
4.1.0
10 changes: 6 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ DOCKERFILE The name of Dockerfile to use.
${_GREEN}Default:${_CLEAR} Dockerfile

DOCKER_FROM The base image to use.
${_GREEN}Default:${_CLEAR} 'ubuntu:24.04'
${_GREEN}Default:${_CLEAR} 'ubuntu:26.04'

BUILDX_PLATFORM
Specifies the platform(s) to build the image for.
Expand Down Expand Up @@ -217,7 +217,7 @@ fi
# Determining the value for DOCKER_FROM
###
if [ -z "$DOCKER_FROM" ]; then
DOCKER_FROM="docker.io/ubuntu:24.04"
DOCKER_FROM="docker.io/ubuntu:26.04"
fi

###
Expand Down Expand Up @@ -305,7 +305,7 @@ gh_env "FINAL_DOCKER_TAG=${IMAGE_NAME_TAGS[0]}"
###
# Checking if the build is necessary,
# meaning build only if one of those values changed:
# - a new tag is beeing created
# - a new tag is being created
# - base image digest
# - netbox git ref (Label: netbox.git-ref)
# - netbox-docker git ref (Label: org.opencontainers.image.revision)
Expand All @@ -314,7 +314,7 @@ gh_env "FINAL_DOCKER_TAG=${IMAGE_NAME_TAGS[0]}"
SHOULD_BUILD="false"
BUILD_REASON=""
if [ -z "${GH_ACTION}" ]; then
# Asuming non Github builds should always proceed
# Assuming non Github builds should always proceed
SHOULD_BUILD="true"
BUILD_REASON="${BUILD_REASON} interactive"
elif [ "false" == "$(check_if_tags_exists "${IMAGE_NAMES[0]}" "$TARGET_DOCKER_TAG")" ]; then
Expand Down Expand Up @@ -404,6 +404,8 @@ fi
# shellcheck disable=SC2031
if [ -n "${HTTP_PROXY}" ]; then
DOCKER_BUILD_ARGS+=(--build-arg "http_proxy=${HTTP_PROXY}")
fi
if [ -n "${HTTPS_PROXY}" ]; then
DOCKER_BUILD_ARGS+=(--build-arg "https_proxy=${HTTPS_PROXY}")
fi
if [ -n "${NO_PROXY}" ]; then
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
netbox: &netbox
image: docker.io/netboxcommunity/netbox:${VERSION-v4.5-4.0.2}
image: docker.io/netboxcommunity/netbox:${VERSION-v4.6-4.1.0}
depends_on:
- postgres
- redis
Expand Down
Loading