POC RO support hooks

This commit is contained in:
thespad 2024-06-14 13:35:25 +01:00
parent 3182240c76
commit b68b2644fe
No known key found for this signature in database
GPG key ID: 08F06191F4587860
3 changed files with 25 additions and 12 deletions

View file

@ -56,9 +56,9 @@ ARG LSIOWN_VERSION="v1"
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="TheLamer" LABEL maintainer="TheLamer"
ADD --chmod=744 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" "/docker-mods" ADD --chmod=755 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" "/docker-mods"
ADD --chmod=744 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/package-install.${PKG_INST_VERSION}" "/etc/s6-overlay/s6-rc.d/init-mods-package-install/run" ADD --chmod=755 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/package-install.${PKG_INST_VERSION}" "/etc/s6-overlay/s6-rc.d/init-mods-package-install/run"
ADD --chmod=744 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/lsiown.${LSIOWN_VERSION}" "/usr/bin/lsiown" ADD --chmod=755 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/lsiown.${LSIOWN_VERSION}" "/usr/bin/lsiown"
# environment variables # environment variables
ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \ ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \

View file

@ -56,9 +56,9 @@ ARG LSIOWN_VERSION="v1"
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="TheLamer" LABEL maintainer="TheLamer"
ADD --chmod=744 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" "/docker-mods" ADD --chmod=745 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" "/docker-mods"
ADD --chmod=744 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/package-install.${PKG_INST_VERSION}" "/etc/s6-overlay/s6-rc.d/init-mods-package-install/run" ADD --chmod=745 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/package-install.${PKG_INST_VERSION}" "/etc/s6-overlay/s6-rc.d/init-mods-package-install/run"
ADD --chmod=744 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/lsiown.${LSIOWN_VERSION}" "/usr/bin/lsiown" ADD --chmod=745 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/lsiown.${LSIOWN_VERSION}" "/usr/bin/lsiown"
# environment variables # environment variables
ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \ ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \

View file

@ -4,10 +4,14 @@
PUID=${PUID:-911} PUID=${PUID:-911}
PGID=${PGID:-911} PGID=${PGID:-911}
groupmod -o -g "$PGID" abc if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then
usermod -o -u "$PUID" abc groupmod -o -g "$PGID" abc
usermod -o -u "$PUID" abc
cat /etc/s6-overlay/s6-rc.d/init-adduser/branding cat /etc/s6-overlay/s6-rc.d/init-adduser/branding
else
cat /run/branding
fi
if [[ -f /donate.txt ]]; then if [[ -f /donate.txt ]]; then
echo ' echo '
@ -21,10 +25,17 @@ https://www.linuxserver.io/donate/
─────────────────────────────────────── ───────────────────────────────────────
GID/UID GID/UID
───────────────────────────────────────' ───────────────────────────────────────'
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
echo " echo "
User UID: $(id -u abc) User UID: $(id -u abc)
User GID: $(id -g abc) User GID: $(id -g abc)
───────────────────────────────────────" ───────────────────────────────────────"
else
echo "
User UID: $(stat /run -c %u)
User GID: $(stat /run -c %g)
───────────────────────────────────────"
fi
if [[ -f /build_version ]]; then if [[ -f /build_version ]]; then
cat /build_version cat /build_version
echo ' echo '
@ -32,6 +43,8 @@ if [[ -f /build_version ]]; then
' '
fi fi
lsiown abc:abc /app if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then
lsiown abc:abc /config lsiown abc:abc /app
lsiown abc:abc /defaults lsiown abc:abc /config
lsiown abc:abc /defaults
fi