Skip to content

Commit d633adf

Browse files
authoredJul 17, 2024··
Merge pull request #60 from linuxserver/ldap-support
2 parents 310f279 + 42f300b commit d633adf

File tree

7 files changed

+21
-9
lines changed

7 files changed

+21
-9
lines changed
 

‎.github/workflows/permissions.yml

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
- '**/run'
66
- '**/finish'
77
- '**/check'
8+
- 'root/migrations/*'
9+
810
jobs:
911
permission_check:
1012
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1

‎Dockerfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ RUN \
1818
libffi-dev \
1919
libxslt-dev \
2020
libxml2-dev \
21+
openldap-dev \
2122
openssl-dev \
2223
postgresql-dev \
2324
python3-dev \
2425
zlib-dev && \
2526
echo "**** install runtime packages ****" && \
2627
apk add --no-cache --upgrade \
27-
tiff \
28+
libldap \
2829
postgresql-client \
2930
python3 \
31+
tiff \
3032
uwsgi \
3133
uwsgi-python && \
3234
echo "**** install netbox ****" && \
@@ -48,6 +50,7 @@ RUN \
4850
pip \
4951
wheel && \
5052
pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ -r requirements.txt && \
53+
pip install --no-cache-dir django-auth-ldap && \
5154
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
5255
echo "**** cleanup ****" && \
5356
apk del --purge \

‎Dockerfile.aarch64

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ RUN \
1818
libffi-dev \
1919
libxslt-dev \
2020
libxml2-dev \
21+
openldap-dev \
2122
openssl-dev \
2223
postgresql-dev \
2324
python3-dev \
2425
zlib-dev && \
2526
echo "**** install runtime packages ****" && \
2627
apk add --no-cache --upgrade \
27-
tiff \
28+
libldap \
2829
postgresql-client \
2930
python3 \
31+
tiff \
3032
uwsgi \
3133
uwsgi-python && \
3234
echo "**** install netbox ****" && \
@@ -48,6 +50,7 @@ RUN \
4850
pip \
4951
wheel && \
5052
pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ -r requirements.txt && \
53+
pip install --no-cache-dir django-auth-ldap && \
5154
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
5255
echo "**** cleanup ****" && \
5356
apk del --purge \

‎Jenkinsfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ pipeline {
255255
-v ${WORKSPACE}:/mnt \
256256
-e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \
257257
-e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \
258-
ghcr.io/linuxserver/baseimage-alpine:3.19 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
258+
ghcr.io/linuxserver/baseimage-alpine:3.20 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
259259
apk add --no-cache python3 && \
260260
python3 -m venv /lsiopy && \
261261
pip install --no-cache-dir -U pip && \
@@ -362,7 +362,7 @@ pipeline {
362362
fi
363363
echo "Starting Stage 4 - External repo updates: Docs, Unraid Template and Readme Sync to Docker Hub"
364364
mkdir -p ${TEMPDIR}/docs
365-
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/docs/docker-documentation
365+
git clone --depth=1 https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/docs/docker-documentation
366366
if [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]] && [[ (! -f ${TEMPDIR}/docs/docker-documentation/docs/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/docs/docker-documentation/docs/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
367367
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/docs/docker-documentation/docs/images/
368368
cd ${TEMPDIR}/docs/docker-documentation
@@ -380,8 +380,8 @@ pipeline {
380380
echo "Docs update not needed, skipping"
381381
fi
382382
mkdir -p ${TEMPDIR}/unraid
383-
git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
384-
git clone https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
383+
git clone --depth=1 https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
384+
git clone --depth=1 https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
385385
if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-logo.png ]]; then
386386
sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-logo.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml
387387
elif [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-icon.png ]]; then
@@ -713,7 +713,7 @@ pipeline {
713713
set -e
714714
docker pull ghcr.io/linuxserver/ci:latest
715715
if [ "${MULTIARCH}" == "true" ]; then
716-
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
716+
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64
717717
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
718718
fi
719719
docker run --rm \
@@ -804,7 +804,7 @@ pipeline {
804804
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
805805
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
806806
if [ "${CI}" == "false" ]; then
807-
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
807+
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64
808808
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
809809
fi
810810
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
333333

334334
## Versions
335335

336+
* **16.07.24:** - Add required packages for LDAP support.
336337
* **01.06.24:** - Rebase to Alpine 3.20.
337338
* **23.12.23:** - Rebase to Alpine 3.19.
338339
* **11.06.23:** - Rebase to Alpine 3.18, deprecate armhf.

‎readme-vars.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ param_volumes:
2020
- { vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Persistent config files" }
2121
param_usage_include_env: true
2222
param_env_vars:
23-
- { env_var: "TZ", env_value: "America/New_York", desc: "Timezone (i.e., America/New_York)" }
2423
- { env_var: "SUPERUSER_EMAIL", env_value: "", desc: "Email address for `admin` account" }
2524
- { env_var: "SUPERUSER_PASSWORD", env_value: "", desc: "Password for `admin` account" }
2625
- { env_var: "ALLOWED_HOST", env_value: "", desc: "The hostname you will use to access the app (i.e., netbox.example.com)" }
@@ -58,6 +57,7 @@ app_setup_block: |
5857
5958
# changelog
6059
changelogs:
60+
- { date: "16.07.24:", desc: "Add required packages for LDAP support."}
6161
- { date: "01.06.24:", desc: "Rebase to Alpine 3.20."}
6262
- { date: "23.12.23:", desc: "Rebase to Alpine 3.19."}
6363
- { date: "11.06.23:", desc: "Rebase to Alpine 3.18, deprecate armhf." }

‎root/etc/s6-overlay/s6-rc.d/init-netbox-config/run

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ ln -sf /config/media /app/netbox/netbox/media
4747

4848
ln -sf /config/configuration.py /app/netbox/netbox/netbox/configuration.py
4949

50+
touch /config/ldap_config.py
51+
ln -sf /config/ldap_config.py /app/netbox/netbox/netbox/ldap_config.py
52+
5053
mv /defaults/uwsgi.ini /app/netbox/netbox/uwsgi.ini > /dev/null 2>&1
5154

5255
# build docs

0 commit comments

Comments
 (0)
Please sign in to comment.