Skip to content
Snippets Groups Projects
Commit 18764d58 authored by Griefed's avatar Griefed :joystick:
Browse files

refactor: Rename default user. Hopefully ensure aliases are set in resulting container

parent 3605a4fb
No related branches found
No related tags found
No related merge requests found
...@@ -93,6 +93,7 @@ RUN \ ...@@ -93,6 +93,7 @@ RUN \
> /run/systemd/container && \ > /run/systemd/container && \
echo "**** Install apt-utils and locales ****" && \ echo "**** Install apt-utils and locales ****" && \
apt-get update && \ apt-get update && \
apt-get upgrade -y && \
apt-get install -y \ apt-get install -y \
apt-utils \ apt-utils \
locales && \ locales && \
...@@ -104,22 +105,22 @@ RUN \ ...@@ -104,22 +105,22 @@ RUN \
tzdata && \ tzdata && \
echo "**** Generate locale ****" && \ echo "**** Generate locale ****" && \
locale-gen en_US.UTF-8 && \ locale-gen en_US.UTF-8 && \
echo "**** Create abc user and make our folders ****" && \ echo "**** Create grfd user and make our folders ****" && \
useradd -u 911 -U -d /config -s /bin/false abc && \ useradd -u 911 -U -d /config -s /bin/false grfd && \
usermod -G users abc && \ usermod -G users grfd && \
mkdir -p \ mkdir -p \
/app \ /app \
/config \ /config \
/data \ /data \
/defaults && \ /defaults && \
mv /usr/bin/with-contenv /usr/bin/with-contenvb && \ mv /usr/bin/with-contenv /usr/bin/with-contenvb && \
patch -u /etc/s6/init/init-stage2 -i /tmp/patch/etc/s6/init/init-stage2.patch && \
echo "**** Create our bash-aliases ****" && \ echo "**** Create our bash-aliases ****" && \
alias ll="LC_COLLATE=C ls -ahl --group-directories-first --color=auto" && \ alias ll="LC_COLLATE=C ls -ahl --group-directories-first --color=auto" && \
alias ..="cd .." && \ alias ..="cd .." && \
echo "**** Cleanup ****" && \ echo "**** Cleanup ****" && \
apt-get remove -y patch && \ apt-get remove -y patch && \
apt-get autoremove && \ apt-get autoremove -y && \
apt-get autoclean -y
apt-get clean && \ apt-get clean && \
rm -rf \ rm -rf \
/tmp/* \ /tmp/* \
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
PUID=${PUID:-911} PUID=${PUID:-911}
PGID=${PGID:-911} PGID=${PGID:-911}
groupmod -o -g "$PGID" abc groupmod -o -g "$PGID" grfd
usermod -o -u "$PUID" abc usermod -o -u "$PUID" grfd
echo ' echo '
------------------------------------- -------------------------------------
...@@ -34,8 +34,8 @@ echo ' ...@@ -34,8 +34,8 @@ echo '
GID/UID GID/UID
-------------------------------------' -------------------------------------'
echo " echo "
User uid: $(id -u abc) User uid: $(id -u grfd)
User gid: $(id -g abc) User gid: $(id -g grfd)
------------------------------------- -------------------------------------
" "
...@@ -55,7 +55,7 @@ Some apps might not behave correctly without this ...@@ -55,7 +55,7 @@ Some apps might not behave correctly without this
' '
fi fi
chown abc:abc /app chown grfd:grfd /app
chown abc:abc /config chown grfd:grfd /config
chown abc:abc /data chown grfd:grfd /data
chown abc:abc /defaults chown grfd:grfd /defaults
alias ll="LC_COLLATE=C ls -ahl --group-directories-first --color=auto"
alias ..="cd .."
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment