rename user to cronicle
This commit is contained in:
parent
bfbc0e22d7
commit
f1f322d58a
@ -27,8 +27,8 @@ RUN apk update && apk add tzdata curl shadow bash xz git procps nodejs npm
|
||||
RUN mkdir /config && \
|
||||
mkdir /app && \
|
||||
#Create default user
|
||||
useradd -u 1000 -U -d /config -s /bin/false mrmeeb && \
|
||||
usermod -G users mrmeeb
|
||||
useradd -u 1000 -U -d /config -s /bin/false cronicle && \
|
||||
usermod -G users cronicle
|
||||
|
||||
#Install s6-overlay
|
||||
RUN curl -fsSL "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz" | tar Jpxf - -C / && \
|
||||
@ -44,9 +44,6 @@ RUN npm install && \
|
||||
node bin/build dist
|
||||
RUN rm -rf /app/cronicle/Docker* .vscode
|
||||
|
||||
#Create Cronicle user, necessary for SSH plugin with default settings
|
||||
RUN adduser --disabled-password --no-create-home cronicle
|
||||
|
||||
COPY root/ /
|
||||
RUN chmod +x /cronicle-prepare.sh && \
|
||||
chmod +x /container-init.sh
|
||||
|
@ -28,11 +28,11 @@ MODE=${MODE}
|
||||
if [[ ! "${PUID}" -eq 0 ]] && [[ ! "${PGID}" -eq 0 ]]; then
|
||||
echo "Executing usermod..."
|
||||
mkdir "/tmp/temphome"
|
||||
usermod -d "/tmp/temphome" mrmeeb
|
||||
usermod -o -u "${PUID}" mrmeeb
|
||||
usermod -d /config mrmeeb
|
||||
usermod -d "/tmp/temphome" cronicle
|
||||
usermod -o -u "${PUID}" cronicle
|
||||
usermod -d /config cronicle
|
||||
rm -rf "/tmp/temphome"
|
||||
groupmod -o -g "${PGID}" mrmeeb
|
||||
groupmod -o -g "${PGID}" cronicle
|
||||
else
|
||||
echo "Running as root is not supported, please fix your PUID and PGID!"
|
||||
exit 1
|
||||
@ -43,11 +43,11 @@ echo "Checking permissions in /config and /app (this can take some time)."
|
||||
if [ ! "$(stat -c %u /app)" -eq "${PUID}" ] || [ ! "$(stat -c %g /app)" -eq "${PGID}" ]
|
||||
then
|
||||
echo "Fixing permissions for /app."
|
||||
chown -R mrmeeb:mrmeeb /app
|
||||
chown -R cronicle:cronicle /app
|
||||
fi
|
||||
|
||||
if [ ! "$(stat -c %u /config)" -eq "${PUID}" ] || [ ! "$(stat -c %g /config)" -eq "${PGID}" ]
|
||||
then
|
||||
echo "Fixing permissions for /config."
|
||||
chown -R mrmeeb:mrmeeb /config
|
||||
chown -R cronicle:cronicle /config
|
||||
fi
|
@ -1 +1 @@
|
||||
exec s6-setuidgid mrmeeb /cronicle-prepare.sh
|
||||
exec s6-setuidgid cronicle /cronicle-prepare.sh
|
@ -1,3 +1,3 @@
|
||||
#!/command/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
exec s6-setuidgid mrmeeb node /app/cronicle/lib/main.js --color 1
|
||||
exec s6-setuidgid cronicle node /app/cronicle/lib/main.js --color 1
|
Loading…
x
Reference in New Issue
Block a user