diff --git a/.github/workflows/permissions.yml b/.github/workflows/permissions.yml index 1447bc5..02e1bdb 100755 --- a/.github/workflows/permissions.yml +++ b/.github/workflows/permissions.yml @@ -5,6 +5,8 @@ on: - '**/run' - '**/finish' - '**/check' + - 'root/migrations/*' + jobs: permission_check: uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1 diff --git a/Dockerfile b/Dockerfile index a5443f4..253c5e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,15 +18,17 @@ RUN \ libffi-dev \ libxslt-dev \ libxml2-dev \ + openldap-dev \ openssl-dev \ postgresql-dev \ python3-dev \ zlib-dev && \ echo "**** install runtime packages ****" && \ apk add --no-cache --upgrade \ - tiff \ + libldap \ postgresql-client \ python3 \ + tiff \ uwsgi \ uwsgi-python && \ echo "**** install netbox ****" && \ @@ -48,6 +50,7 @@ RUN \ pip \ wheel && \ pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ -r requirements.txt && \ + pip install --no-cache-dir django-auth-ldap && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ apk del --purge \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index d199553..9a212fd 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -18,15 +18,17 @@ RUN \ libffi-dev \ libxslt-dev \ libxml2-dev \ + openldap-dev \ openssl-dev \ postgresql-dev \ python3-dev \ zlib-dev && \ echo "**** install runtime packages ****" && \ apk add --no-cache --upgrade \ - tiff \ + libldap \ postgresql-client \ python3 \ + tiff \ uwsgi \ uwsgi-python && \ echo "**** install netbox ****" && \ @@ -48,6 +50,7 @@ RUN \ pip \ wheel && \ pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ -r requirements.txt && \ + pip install --no-cache-dir django-auth-ldap && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ apk del --purge \ diff --git a/Jenkinsfile b/Jenkinsfile index 412fdd3..8886cc9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -255,7 +255,7 @@ pipeline { -v ${WORKSPACE}:/mnt \ -e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \ -e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \ - ghcr.io/linuxserver/baseimage-alpine:3.19 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\ + ghcr.io/linuxserver/baseimage-alpine:3.20 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\ apk add --no-cache python3 && \ python3 -m venv /lsiopy && \ pip install --no-cache-dir -U pip && \ @@ -362,7 +362,7 @@ pipeline { fi echo "Starting Stage 4 - External repo updates: Docs, Unraid Template and Readme Sync to Docker Hub" mkdir -p ${TEMPDIR}/docs - git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/docs/docker-documentation + git clone --depth=1 https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/docs/docker-documentation 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 cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/docs/docker-documentation/docs/images/ cd ${TEMPDIR}/docs/docker-documentation @@ -380,8 +380,8 @@ pipeline { echo "Docs update not needed, skipping" fi mkdir -p ${TEMPDIR}/unraid - git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates - git clone https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates + git clone --depth=1 https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates + git clone --depth=1 https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-logo.png ]]; then 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 elif [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-icon.png ]]; then @@ -713,7 +713,7 @@ pipeline { set -e docker pull ghcr.io/linuxserver/ci:latest if [ "${MULTIARCH}" == "true" ]; then - docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} + docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64 docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG} fi docker run --rm \ @@ -804,7 +804,7 @@ pipeline { echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin if [ "${CI}" == "false" ]; then - docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} + docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64 docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG} fi for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do diff --git a/README.md b/README.md index 23d513e..d4a3bfe 100644 --- a/README.md +++ b/README.md @@ -333,6 +333,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **16.07.24:** - Add required packages for LDAP support. * **01.06.24:** - Rebase to Alpine 3.20. * **23.12.23:** - Rebase to Alpine 3.19. * **11.06.23:** - Rebase to Alpine 3.18, deprecate armhf. diff --git a/readme-vars.yml b/readme-vars.yml index 7992567..90e1764 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -20,7 +20,6 @@ param_volumes: - { vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Persistent config files" } param_usage_include_env: true param_env_vars: - - { env_var: "TZ", env_value: "America/New_York", desc: "Timezone (i.e., America/New_York)" } - { env_var: "SUPERUSER_EMAIL", env_value: "", desc: "Email address for `admin` account" } - { env_var: "SUPERUSER_PASSWORD", env_value: "", desc: "Password for `admin` account" } - { 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: | # changelog changelogs: + - { date: "16.07.24:", desc: "Add required packages for LDAP support."} - { date: "01.06.24:", desc: "Rebase to Alpine 3.20."} - { date: "23.12.23:", desc: "Rebase to Alpine 3.19."} - { date: "11.06.23:", desc: "Rebase to Alpine 3.18, deprecate armhf." } diff --git a/root/etc/s6-overlay/s6-rc.d/init-netbox-config/run b/root/etc/s6-overlay/s6-rc.d/init-netbox-config/run index bf19072..152530a 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-netbox-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-netbox-config/run @@ -47,6 +47,9 @@ ln -sf /config/media /app/netbox/netbox/media ln -sf /config/configuration.py /app/netbox/netbox/netbox/configuration.py +touch /config/ldap_config.py +ln -sf /config/ldap_config.py /app/netbox/netbox/netbox/ldap_config.py + mv /defaults/uwsgi.ini /app/netbox/netbox/uwsgi.ini > /dev/null 2>&1 # build docs