Merge pull request #46 from linuxserver/3.17

Rebase to alpine 3.17
This commit is contained in:
Eric Nemchik 2022-12-30 16:28:54 -06:00 committed by GitHub
commit ad8faaa7ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 60 additions and 42 deletions

View File

@ -1,4 +1,6 @@
FROM ghcr.io/linuxserver/baseimage-alpine:3.15
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:3.17
# set version label
ARG BUILD_DATE
@ -19,24 +21,24 @@ RUN \
apk add --no-cache \
libffi \
libldap \
py3-pip \
python3 && \
if [ -z ${LDAP_VERSION+x} ]; then \
LDAP_INSTALL="python-ldap"; \
else \
LDAP_INSTALL="python-ldap==${LDAP_VERSION}"; \
LDAP_VERSION=$(curl -sL https://pypi.python.org/pypi/python-ldap/json |jq -r '. | .info.version'); \
fi && \
pip3 install -U --no-cache-dir pip setuptools wheel && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.15/ \
python3 -m ensurepip && \
pip3 install -U --no-cache-dir \
pip \
wheel && \
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \
cryptography \
${LDAP_INSTALL} && \
python-ldap=="${LDAP_VERSION}" && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/* \
/root/.cache \
/root/.cargo
$HOME/.cache \
$HOME/.cargo
# copy local files
COPY root/ /

View File

@ -1,4 +1,6 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17
# set version label
ARG BUILD_DATE
@ -19,24 +21,24 @@ RUN \
apk add --no-cache \
libffi \
libldap \
py3-pip \
python3 && \
if [ -z ${LDAP_VERSION+x} ]; then \
LDAP_INSTALL="python-ldap"; \
else \
LDAP_INSTALL="python-ldap==${LDAP_VERSION}"; \
LDAP_VERSION=$(curl -sL https://pypi.python.org/pypi/python-ldap/json |jq -r '. | .info.version'); \
fi && \
pip3 install -U --no-cache-dir pip setuptools wheel && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.15/ \
python3 -m ensurepip && \
pip3 install -U --no-cache-dir \
pip \
wheel && \
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \
cryptography \
${LDAP_INSTALL} && \
python-ldap=="${LDAP_VERSION}" && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/* \
/root/.cache \
/root/.cargo
$HOME/.cache \
$HOME/.cargo
# copy local files
COPY root/ /

View File

@ -1,4 +1,6 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.17
# set version label
ARG BUILD_DATE
@ -19,24 +21,24 @@ RUN \
apk add --no-cache \
libffi \
libldap \
py3-pip \
python3 && \
if [ -z ${LDAP_VERSION+x} ]; then \
LDAP_INSTALL="python-ldap"; \
else \
LDAP_INSTALL="python-ldap==${LDAP_VERSION}"; \
LDAP_VERSION=$(curl -sL https://pypi.python.org/pypi/python-ldap/json |jq -r '. | .info.version'); \
fi && \
pip3 install -U --no-cache-dir pip setuptools wheel && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.15/ \
python3 -m ensurepip && \
pip3 install -U --no-cache-dir \
pip \
wheel && \
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ \
cryptography \
${LDAP_INSTALL} && \
python-ldap=="${LDAP_VERSION}" && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/* \
/root/.cache \
/root/.cargo
$HOME/.cache \
$HOME/.cargo
# copy local files
COPY root/ /

View File

@ -43,6 +43,7 @@ app_setup_block: |
# changelog
changelogs:
- { date: "19.09.22:", desc: "Rebase to alpine 3.17." }
- { date: "19.09.22:", desc: "Rebase to alpine 3.15." }
- { date: "14.05.21:", desc: "Add linuxserver wheel index." }
- { date: "12.02.21:", desc: "Clean up cargo/rust cache." }

View File

@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# generate fernet key for ldap if it doesn't exist
if grep -q 'REPLACEWITHFERNETKEY' /app/ldap-backend-app.py; then
@ -13,7 +14,7 @@ if grep -q 'REPLACEWITHFERNETKEY' /app/ldap-backend-app.py; then
KEY="b'${FERNETKEY}'"
echo "using FERNETKEY from env variable"
fi
sed -i "s/REPLACEWITHFERNETKEY/${KEY}/" /app/ldap-backend-app.py
sed -i "s/REPLACEWITHFERNETKEY/${KEY}/" /app/nginx-ldap-auth-daemon.py
sed -i "s/REPLACEWITHFERNETKEY/${KEY}/" /app/nginx-ldap-auth-daemon.py
fi

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-ldap-config/run

View File

@ -0,0 +1 @@
3

View File

@ -0,0 +1,7 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 9000" \
s6-setuidgid abc python3 /app/ldap-backend-app.py \
--host 0.0.0.0 --port 9000

View File

@ -0,0 +1 @@
longrun

View File

@ -0,0 +1 @@
4

View File

@ -0,0 +1,7 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8888" \
s6-setuidgid abc python3 /app/nginx-ldap-auth-daemon.py \
--host 0.0.0.0 --port 8888

View File

@ -0,0 +1 @@
longrun

View File

@ -1,5 +0,0 @@
#!/usr/bin/with-contenv bash
exec \
s6-setuidgid abc python3 /app/ldap-backend-app.py \
--host 0.0.0.0 --port 9000

View File

@ -1,5 +0,0 @@
#!/usr/bin/with-contenv bash
exec \
s6-setuidgid abc python3 /app/nginx-ldap-auth-daemon.py \
--host 0.0.0.0 --port 8888