POC RO support hooks
This commit is contained in:
parent
3182240c76
commit
b68b2644fe
|
|
@ -56,9 +56,9 @@ ARG LSIOWN_VERSION="v1"
|
|||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="TheLamer"
|
||||
|
||||
ADD --chmod=744 "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=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/docker-mods.${MODS_VERSION}" "/docker-mods"
|
||||
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=755 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/lsiown.${LSIOWN_VERSION}" "/usr/bin/lsiown"
|
||||
|
||||
# environment variables
|
||||
ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ ARG LSIOWN_VERSION="v1"
|
|||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="TheLamer"
|
||||
|
||||
ADD --chmod=744 "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=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/docker-mods.${MODS_VERSION}" "/docker-mods"
|
||||
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=745 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/lsiown.${LSIOWN_VERSION}" "/usr/bin/lsiown"
|
||||
|
||||
# environment variables
|
||||
ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \
|
||||
|
|
|
|||
|
|
@ -4,10 +4,14 @@
|
|||
PUID=${PUID:-911}
|
||||
PGID=${PGID:-911}
|
||||
|
||||
if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then
|
||||
groupmod -o -g "$PGID" abc
|
||||
usermod -o -u "$PUID" abc
|
||||
|
||||
cat /etc/s6-overlay/s6-rc.d/init-adduser/branding
|
||||
else
|
||||
cat /run/branding
|
||||
fi
|
||||
|
||||
if [[ -f /donate.txt ]]; then
|
||||
echo '
|
||||
|
|
@ -21,10 +25,17 @@ https://www.linuxserver.io/donate/
|
|||
───────────────────────────────────────
|
||||
GID/UID
|
||||
───────────────────────────────────────'
|
||||
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
|
||||
echo "
|
||||
User UID: $(id -u 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
|
||||
cat /build_version
|
||||
echo '
|
||||
|
|
@ -32,6 +43,8 @@ if [[ -f /build_version ]]; then
|
|||
'
|
||||
fi
|
||||
|
||||
if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then
|
||||
lsiown abc:abc /app
|
||||
lsiown abc:abc /config
|
||||
lsiown abc:abc /defaults
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue