Reconfigured users home directory
This commit is contained in:
parent
8eb6c0dfb0
commit
845e1aa1fc
|
|
@ -95,8 +95,8 @@ RUN mkdir /workspace
|
||||||
|
|
||||||
# Clone and install cloud9
|
# Clone and install cloud9
|
||||||
RUN git clone https://github.com/c9/core.git /cloud9/c9sdk
|
RUN git clone https://github.com/c9/core.git /cloud9/c9sdk
|
||||||
RUN mkdir -p /cloud9/c9sdk/build /workspace/.ubuntu/.standalone
|
#RUN mkdir -p /cloud9/c9sdk/build /workspace/.ubuntu/.standalone
|
||||||
RUN ln -sf /workspace/.ubuntu/.standalone /cloud9/c9sdk/build/standalone
|
#RUN ln -sf /workspace/.ubuntu/.standalone /cloud9/c9sdk/build/standalone
|
||||||
RUN /cloud9/c9sdk/scripts/install-sdk.sh
|
RUN /cloud9/c9sdk/scripts/install-sdk.sh
|
||||||
RUN cd /cloud9/c9sdk && git reset --hard
|
RUN cd /cloud9/c9sdk && git reset --hard
|
||||||
RUN wget -O user-install.sh https://raw.githubusercontent.com/c9/install/master/install.sh && mv user-install.sh /cloud9/
|
RUN wget -O user-install.sh https://raw.githubusercontent.com/c9/install/master/install.sh && mv user-install.sh /cloud9/
|
||||||
|
|
@ -161,7 +161,8 @@ RUN echo \
|
||||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
||||||
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin menulibre python3-pip keychain python3.8-venv strace gedit gvfs-backends
|
RUN apt-get -y install menulibre python3-pip keychain python3.8-venv strace gedit gvfs-backends
|
||||||
|
RUN apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
||||||
|
|
||||||
RUN wget -O beyond-compare.deb https://www.scootersoftware.com/$(curl -sd "platform=linux" https://www.scootersoftware.com/download.php | grep amd64.deb | awk -F\" '{print $2}' | sed 's/\///g')
|
RUN wget -O beyond-compare.deb https://www.scootersoftware.com/$(curl -sd "platform=linux" https://www.scootersoftware.com/download.php | grep amd64.deb | awk -F\" '{print $2}' | sed 's/\///g')
|
||||||
RUN wget -O sublime-text.deb $(curl -s https://www.sublimetext.com/download_thanks?target=x64-deb#direct-downloads | grep amd64.deb | grep url | awk -F'"' '{print $2}')
|
RUN wget -O sublime-text.deb $(curl -s https://www.sublimetext.com/download_thanks?target=x64-deb#direct-downloads | grep amd64.deb | grep url | awk -F'"' '{print $2}')
|
||||||
|
|
@ -172,4 +173,5 @@ RUN apt install -y ./beyond-compare.deb ./sublime-text.deb ./sublime-merge.deb .
|
||||||
RUN npm -g install sass yuglify
|
RUN npm -g install sass yuglify
|
||||||
|
|
||||||
# Copy files
|
# Copy files
|
||||||
COPY rootfs /
|
COPY rootfs /
|
||||||
|
RUN rm -rf /workspace/*
|
||||||
|
|
@ -11,7 +11,6 @@ sleep 5
|
||||||
|
|
||||||
DBUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)
|
DBUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)
|
||||||
echo "DBUS Session Address: $DBUS_ADDRESS"
|
echo "DBUS Session Address: $DBUS_ADDRESS"
|
||||||
echo "$DBUS_ADDRESS" > /var/log/dbus.txt
|
|
||||||
export DBUS_SESSION_BUS_ADDRESS
|
export DBUS_SESSION_BUS_ADDRESS
|
||||||
export DISPLAY=:1.0
|
export DISPLAY=:1.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,6 @@ command=bash -c 'while ps aux | grep user-install.sh | grep -v grep 2>&1> /dev/n
|
||||||
|
|
||||||
[program:desktop]
|
[program:desktop]
|
||||||
priority=30
|
priority=30
|
||||||
directory=/workspace/.ubuntu/dynamic-background/active
|
directory=/home/%USER%/.dynamic-background/active
|
||||||
user=%USER%
|
user=%USER%
|
||||||
command=bash /usr/share/backgrounds/dynamic.sh
|
command=bash /usr/share/backgrounds/dynamic.sh
|
||||||
|
|
@ -31,7 +31,8 @@ USER=${USER:-root}
|
||||||
HOME=/root
|
HOME=/root
|
||||||
if [ "$USER" != "root" ]; then
|
if [ "$USER" != "root" ]; then
|
||||||
echo "* enable custom user: $USER"
|
echo "* enable custom user: $USER"
|
||||||
useradd --create-home --shell /bin/bash --user-group --groups adm,sudo,docker -d /workspace/.home/$USER $USER
|
#useradd --create-home --shell /bin/bash --user-group --groups adm,sudo,docker -d /workspace/.home/$USER $USER
|
||||||
|
useradd --create-home --shell /bin/bash --user-group --groups adm,sudo,docker $USER
|
||||||
|
|
||||||
if [ -z "$PASSWORD" ]; then
|
if [ -z "$PASSWORD" ]; then
|
||||||
echo " set default password to \"ubuntu\""
|
echo " set default password to \"ubuntu\""
|
||||||
|
|
@ -41,7 +42,8 @@ if [ "$USER" != "root" ]; then
|
||||||
|
|
||||||
PASSWORD=$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)
|
PASSWORD=$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)
|
||||||
fi
|
fi
|
||||||
HOME=/workspace/.home/$USER
|
#HOME=/workspace/.home/$USER
|
||||||
|
HOME=/home/$USER
|
||||||
echo "$USER:$PASSWORD" | chpasswd
|
echo "$USER:$PASSWORD" | chpasswd
|
||||||
cp -r /root/{.config,.gtkrc-2.0,.asoundrc} ${HOME}
|
cp -r /root/{.config,.gtkrc-2.0,.asoundrc} ${HOME}
|
||||||
chown -R $USER:$USER ${HOME}
|
chown -R $USER:$USER ${HOME}
|
||||||
|
|
@ -86,27 +88,39 @@ if [ -n "$DOMAIN" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Reduce this so its not everything
|
# Reduce this so its not everything
|
||||||
chown -R $USER:$USER $HOME /cloud9 /workspace/.c9 /workspace/.$USER
|
#chown -R $USER:$USER $HOME /cloud9 /workspace
|
||||||
|
|
||||||
# Add required packages for ubuntu user (Run as user)
|
# Add required packages for ubuntu user (Run as user)
|
||||||
|
|
||||||
rm -rf $HOME/.c9
|
#rm -rf $HOME/.c9
|
||||||
mkdir -p /workspace/.c9
|
#mkdir -p /workspace/.c9
|
||||||
chown $USER:$USER /workspace/.c9
|
#chown $USER:$USER /workspace/.c9
|
||||||
sudo -H -u $USER bash -c 'bash /cloud9/user-install.sh' 2>&1> /workspace/.c9/install.log &
|
sudo -H -u $USER bash -c 'bash /cloud9/user-install.sh' 2>&1> /home/$USER/.cloud9-install.log &
|
||||||
|
|
||||||
# Only for testing while editing the menu
|
# Only for testing while editing the menu
|
||||||
chown $USER /usr/share/applications/
|
#chown $USER /usr/share/applications/
|
||||||
|
|
||||||
# Setup Backgrounds
|
# Setup Backgrounds
|
||||||
mkdir -p /workspace/.ubuntu/dynamic-background/active/
|
mkdir -p /home/$USER/.dynamic-background/active/
|
||||||
for BACKGROUND in $(ls -1 /usr/share/backgrounds/dynamic-background/ | grep -v -e "active" -e "default" ); do
|
for BACKGROUND in $(ls -1 /usr/share/backgrounds/dynamic-background/ | grep -v -e "active" -e "default" ); do
|
||||||
cp -r /usr/share/backgrounds/dynamic-background/$BACKGROUND /workspace/.ubuntu/dynamic-background/
|
cp -r /usr/share/backgrounds/dynamic-background/$BACKGROUND /home/$USER/.dynamic-background/active/
|
||||||
done
|
done
|
||||||
if [ ! "$(ls -A /workspace/.ubuntu/dynamic-background/active/ )" ]; then
|
if [ ! "$(ls -A /home/$USER/.dynamic-background/active/ )" ]; then
|
||||||
cp -r /usr/share/backgrounds/dynamic-background/default/* /workspace/.ubuntu/dynamic-background/active
|
cp -r /usr/share/backgrounds/dynamic-background/default/* /home/$USER/.dynamic-background/active/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bash /cloud9/configure_desktop.sh &
|
bash /cloud9/configure_desktop.sh &
|
||||||
|
|
||||||
|
mkdir /home/$USER/Workspace
|
||||||
|
chown $USER:$USER /home/$USER/Workspace
|
||||||
|
echo "/home/$USER/Workspace /workspace none defaults,bind 0 0" >> /etc/fstab
|
||||||
|
mount -a
|
||||||
|
|
||||||
|
mkdir /home/$USER/.config/gtk-3.0
|
||||||
|
chown $USER:$USER /home/$USER/.config/gtk-3.0
|
||||||
|
echo "file:///home/$USER/Documents" > /home/$USER/.config/gtk-3.0/bookmarks
|
||||||
|
echo "file:///home/$USER/Workspace" >> /home/$USER/.config/gtk-3.0/bookmarks
|
||||||
|
echo "file:///home/$USER/Workspace/Company%20Files" >> /home/$USER/.config/gtk-3.0/bookmarks
|
||||||
|
echo "file:///home/$USER/Downloads" >> /home/$USER/.config/gtk-3.0/bookmarks
|
||||||
|
|
||||||
exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf
|
exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
OLD_FILE=""
|
OLD_FILE=""
|
||||||
DBUS_FILE="/var/log/dbus.txt"
|
|
||||||
DIR=$(pwd)
|
DIR=$(pwd)
|
||||||
|
|
||||||
export DISPLAY=:1.0
|
export DISPLAY=:1.0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue