From bd371deaa0c3649b449c19a4f042eb299632a275 Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Thu, 29 Sep 2022 14:06:38 -0400 Subject: [PATCH 1/4] Testing preinstall --- Dockerfile | 13 +++++++++++++ rootfs/startup.sh | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8e8b0dd..015996e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -177,3 +177,16 @@ RUN apt -y remove thunar # Copy files COPY rootfs / RUN rm -rf /workspace/* + + +RUN useradd -u 99 -ms /bin/bash ubuntu +RUN adduser ubuntu sudo +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +# Install from user (not doing) +USER ubuntu +CMD /bin/bash + +run bash /cloud9/user-install.sh + +user root \ No newline at end of file diff --git a/rootfs/startup.sh b/rootfs/startup.sh index 5cad067..032d5b5 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -103,7 +103,12 @@ fi #rm -rf $HOME/.c9 #mkdir -p /workspace/.c9 #chown $USER:$USER /workspace/.c9 -sudo -H -u $USER bash -c 'bash /cloud9/user-install.sh' 2>&1> /home/$USER/.cloud9-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 #chown $USER /usr/share/applications/ From 523439e161a6dd496da352979052bfa0fe47de41 Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Thu, 29 Sep 2022 15:18:01 -0400 Subject: [PATCH 2/4] Adjusting user --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 015996e..e93d208 100644 --- a/Dockerfile +++ b/Dockerfile @@ -179,8 +179,8 @@ COPY rootfs / RUN rm -rf /workspace/* -RUN useradd -u 99 -ms /bin/bash ubuntu -RUN adduser ubuntu sudo +RUN useradd -u 99 -aG sudo -ms /bin/bash ubuntu +#RUN adduser ubuntu sudo RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers # Install from user (not doing) From 224cdd4d7802e785d74ad11d31e20bfd3a32d317 Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Wed, 21 Dec 2022 10:46:20 -0500 Subject: [PATCH 3/4] Fixed command --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e93d208..821c275 100644 --- a/Dockerfile +++ b/Dockerfile @@ -179,7 +179,7 @@ COPY rootfs / RUN rm -rf /workspace/* -RUN useradd -u 99 -aG sudo -ms /bin/bash ubuntu +RUN useradd -u 99 -G sudo -ms /bin/bash ubuntu #RUN adduser ubuntu sudo RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers From 76f3040bc399cd6dedb7d704e9e6276050fb553a Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Wed, 21 Dec 2022 13:17:03 -0500 Subject: [PATCH 4/4] Fixed user --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 821c275..e3bff7f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -179,9 +179,10 @@ COPY rootfs / RUN rm -rf /workspace/* -RUN useradd -u 99 -G sudo -ms /bin/bash ubuntu +RUN useradd -d /home/ubuntu -u 99 -G sudo -ms /bin/bash ubuntu #RUN adduser ubuntu sudo RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers +RUN chown ubuntu:ubuntu /home/ubuntu # Install from user (not doing) USER ubuntu