From 845e1aa1fcaef8fbae1d2410a5f5b74957437b8f Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Sun, 14 Aug 2022 00:43:22 -0400 Subject: [PATCH 01/17] Reconfigured users home directory --- Dockerfile.amd64 | 10 +++-- rootfs/cloud9/configure_desktop.sh | 1 - rootfs/etc/supervisor/conf.d/supervisord.conf | 2 +- rootfs/startup.sh | 38 +++++++++++++------ rootfs/usr/share/backgrounds/dynamic.sh | 1 - 5 files changed, 33 insertions(+), 19 deletions(-) diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index 5d05641..2d177f6 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -95,8 +95,8 @@ RUN mkdir /workspace # Clone and install cloud9 RUN git clone https://github.com/c9/core.git /cloud9/c9sdk -RUN mkdir -p /cloud9/c9sdk/build /workspace/.ubuntu/.standalone -RUN ln -sf /workspace/.ubuntu/.standalone /cloud9/c9sdk/build/standalone +#RUN mkdir -p /cloud9/c9sdk/build /workspace/.ubuntu/.standalone +#RUN ln -sf /workspace/.ubuntu/.standalone /cloud9/c9sdk/build/standalone RUN /cloud9/c9sdk/scripts/install-sdk.sh 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/ @@ -161,7 +161,8 @@ RUN echo \ "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 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 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 # Copy files -COPY rootfs / \ No newline at end of file +COPY rootfs / +RUN rm -rf /workspace/* \ No newline at end of file diff --git a/rootfs/cloud9/configure_desktop.sh b/rootfs/cloud9/configure_desktop.sh index 37f68e6..72eb475 100644 --- a/rootfs/cloud9/configure_desktop.sh +++ b/rootfs/cloud9/configure_desktop.sh @@ -11,7 +11,6 @@ sleep 5 DBUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-) echo "DBUS Session Address: $DBUS_ADDRESS" -echo "$DBUS_ADDRESS" > /var/log/dbus.txt export DBUS_SESSION_BUS_ADDRESS export DISPLAY=:1.0 diff --git a/rootfs/etc/supervisor/conf.d/supervisord.conf b/rootfs/etc/supervisor/conf.d/supervisord.conf index 970d49d..df60d06 100644 --- a/rootfs/etc/supervisor/conf.d/supervisord.conf +++ b/rootfs/etc/supervisor/conf.d/supervisord.conf @@ -50,6 +50,6 @@ command=bash -c 'while ps aux | grep user-install.sh | grep -v grep 2>&1> /dev/n [program:desktop] priority=30 -directory=/workspace/.ubuntu/dynamic-background/active +directory=/home/%USER%/.dynamic-background/active user=%USER% command=bash /usr/share/backgrounds/dynamic.sh \ No newline at end of file diff --git a/rootfs/startup.sh b/rootfs/startup.sh index e79999e..89db59e 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -31,7 +31,8 @@ USER=${USER:-root} HOME=/root if [ "$USER" != "root" ]; then 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 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) fi - HOME=/workspace/.home/$USER + #HOME=/workspace/.home/$USER + HOME=/home/$USER echo "$USER:$PASSWORD" | chpasswd cp -r /root/{.config,.gtkrc-2.0,.asoundrc} ${HOME} chown -R $USER:$USER ${HOME} @@ -86,27 +88,39 @@ if [ -n "$DOMAIN" ]; then fi # 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) -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> /workspace/.c9/install.log & +#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 & # Only for testing while editing the menu -chown $USER /usr/share/applications/ +#chown $USER /usr/share/applications/ # 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 - 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 -if [ ! "$(ls -A /workspace/.ubuntu/dynamic-background/active/ )" ]; then - cp -r /usr/share/backgrounds/dynamic-background/default/* /workspace/.ubuntu/dynamic-background/active +if [ ! "$(ls -A /home/$USER/.dynamic-background/active/ )" ]; then + cp -r /usr/share/backgrounds/dynamic-background/default/* /home/$USER/.dynamic-background/active/ fi 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 \ No newline at end of file diff --git a/rootfs/usr/share/backgrounds/dynamic.sh b/rootfs/usr/share/backgrounds/dynamic.sh index 39f43db..54396c5 100644 --- a/rootfs/usr/share/backgrounds/dynamic.sh +++ b/rootfs/usr/share/backgrounds/dynamic.sh @@ -1,5 +1,4 @@ OLD_FILE="" -DBUS_FILE="/var/log/dbus.txt" DIR=$(pwd) export DISPLAY=:1.0 From e9bd2372ed7a560d12c916b5bf55d1948b511f70 Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Mon, 15 Aug 2022 23:06:26 -0400 Subject: [PATCH 02/17] Fixing directories after change of file manager --- Dockerfile.amd64 | 6 +- rootfs/etc/skel/.config/xfce4/helpers.rc | 4 + rootfs/etc/xdg/user-dirs.defaults | 6 +- rootfs/startup.sh | 33 ++- .../usr/share/applications/nautilus.desktop | 198 ++++++++++++++++++ rootfs/usr/share/applications/thunar.desktop | 2 +- 6 files changed, 233 insertions(+), 16 deletions(-) create mode 100644 rootfs/etc/skel/.config/xfce4/helpers.rc create mode 100644 rootfs/usr/share/applications/nautilus.desktop diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index 2d177f6..8e8b0dd 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -161,7 +161,7 @@ RUN echo \ "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 RUN apt-get update -RUN apt-get -y install menulibre python3-pip keychain python3.8-venv strace gedit gvfs-backends +RUN apt-get -y install nautilus 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') @@ -172,6 +172,8 @@ RUN apt install -y ./beyond-compare.deb ./sublime-text.deb ./sublime-merge.deb . RUN npm -g install sass yuglify +RUN apt -y remove thunar + # Copy files COPY rootfs / -RUN rm -rf /workspace/* \ No newline at end of file +RUN rm -rf /workspace/* diff --git a/rootfs/etc/skel/.config/xfce4/helpers.rc b/rootfs/etc/skel/.config/xfce4/helpers.rc new file mode 100644 index 0000000..f9ac46e --- /dev/null +++ b/rootfs/etc/skel/.config/xfce4/helpers.rc @@ -0,0 +1,4 @@ +FileManager=nautilus +WebBrowser=google-chrome +TerminalEmulator=xfce4-terminal + diff --git a/rootfs/etc/xdg/user-dirs.defaults b/rootfs/etc/xdg/user-dirs.defaults index 8e4c0d0..875709f 100644 --- a/rootfs/etc/xdg/user-dirs.defaults +++ b/rootfs/etc/xdg/user-dirs.defaults @@ -4,9 +4,9 @@ # will be translated on a per-path-element basis into the users locale DESKTOP=Desktop DOWNLOAD=Downloads -TEMPLATES=Workspace -PUBLICSHARE=Workspace/Company Files -DOCUMENTS=Documents +#TEMPLATES=Workspace +PUBLICSHARE=Shared Files +DOCUMENTS=Workspace #MUSIC="$HOME" #PICTURES="$HOME" #VIDEOS="$HOME" diff --git a/rootfs/startup.sh b/rootfs/startup.sh index 89db59e..78aff7e 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -51,6 +51,13 @@ if [ "$USER" != "root" ]; then fi sed -i -e "s|%USER%|$USER|" -e "s|%HOME%|$HOME|" /etc/supervisor/conf.d/supervisord.conf +#mkdir -r /home/$USER/.config/ +# Set the default file manager +#grep "FileManager" /home/$USER/.config/xfce4-helpers.rc && sed -i "/FileManager/c\FileManager=nautilus" || echo "FileManager=nautilus" >> /home/$USER/.config/xfce4-helpers.rc +# Set the default web browser if it does not exist +#grep "WebBrowser" /home/$USER/.config/xfce4-helpers.rc || echo "WebBrowser=google-chrome" >> /home/$USER/.config/xfce4-helpers.rc +#chown -R $USER:$USER /home/$USER/.config + # nginx workers sed -i 's|worker_processes .*|worker_processes 1;|' /etc/nginx/nginx.conf @@ -111,16 +118,22 @@ fi 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 +mkdir -p "/home/$USER/Workspace/-Shared Files-" +grep -qxF "/home/$USER/Workspace /workspace none defaults,bind 0 0" /etc/fstab || echo "/home/$USER/Workspace /workspace none defaults,bind 0 0" >> /etc/fstab +grep -qxF "/home/$USER/Shared\ Files /workspace/-Shared\ Files- none defaults,bind 0 0" /etc/fstab || echo "/home/$USER/Shared\ Files /workspace/-Shared\ Files- 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 +# Make directory for bookmarks +mkdir -p /home/$USER/.config/gtk-3.0 -exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf \ No newline at end of file +# Keep these bookmarks +grep "file:///home/$USER/Documents" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Documents" >> /home/$USER/.config/gtk-3.0/bookmarks +grep "file:///home/$USER/Workspace" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Workspace" >> /home/$USER/.config/gtk-3.0/bookmarks +grep "file:///home/$USER/Workspace/Shared%20Files" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Workspace/Shared%20Files" >> /home/$USER/.config/gtk-3.0/bookmarks +grep "file:///home/$USER/Downloads" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Downloads" >> /home/$USER/.config/gtk-3.0/bookmarks + +grep "127.0.0.1 archive.linux.duke.edu" /etc/hosts || echo "127.0.0.1 archive.linux.duke.edu" >> /etc/hosts + +chown -R $USER:$USER /home/$USER/ + +exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf diff --git a/rootfs/usr/share/applications/nautilus.desktop b/rootfs/usr/share/applications/nautilus.desktop new file mode 100644 index 0000000..94f0d9a --- /dev/null +++ b/rootfs/usr/share/applications/nautilus.desktop @@ -0,0 +1,198 @@ +[Desktop Entry] +Name=Nautilus File Manager +Name[am]=ቱናር መዝገብ አስተዳዳሪ +Name[ar]=مدير الملفات ثونار +Name[ast]=Xestor de ficheros Nautilus +Name[be]=Кіраўнік файлаў Nautilus +Name[bg]=Файлов мениджър Nautilus +Name[bn]=Nautilus ফাইল ম্যানেজার +Name[ca]=Gestor de fitxers Nautilus +Name[cs]=Správce souborů Nautilus +Name[da]=Nautilus Filhåndtering +Name[de]=Nautilus-Dateiverwaltung +Name[el]=Διαχειριστής αρχείων Nautilus +Name[en_AU]=Nautilus File Manager +Name[en_GB]=Nautilus File Manager +Name[eo]=Nautilus dosier-administrilo +Name[es]=Gestor de archivos Nautilus +Name[et]=Failihaldur Nautilus +Name[eu]=Nautilus fitxategi kudeatzailea +Name[fa_IR]=مدیر پرونده‌های تونار +Name[fi]=Nautilus-tiedostonhallinta +Name[fr]=Gestionnaire de fichiers Nautilus +Name[gl]=Xestor de ficheiros Nautilus +Name[he]=מנהל קבצים Nautilus +Name[hr]=Nautilus upravitelj datotekama +Name[hu]=Nautilus fájlkezelő +Name[hy]=Nautilus նիշք +Name[hy_AM]=Nautilus նիշք +Name[id]=Manajer Berkas Nautilus +Name[ie]=Gerente de files Nautilus +Name[is]=Nautilus skráastjóri +Name[it]=Il gestore dei file Nautilus +Name[ja]=Nautilus ファイルマネージャー +Name[kk]=Nautilus файлдар басқарушысы +Name[ko]=투나 파일 관리자 +Name[lt]=Nautilus failų tvarkytuvė +Name[lv]=Nautilus failu pārvaldnieks +Name[ms]=Pengurus Fail Nautilus +Name[nb]=Nautilus Filbehandler +Name[nl]=Nautilus bestandbeheerder +Name[nn]=Nautilus filhandsaming +Name[oc]=Gestionari de Fichièrs Nautilus +Name[pa]=ਥੰਨਰ ਫਾਇਲ ਮੈਨੇਜਰ +Name[pl]=Menedżer plików Nautilus +Name[pt]=Gestor de ficheiros Nautilus +Name[pt_BR]=Gerenciador de arquivos Nautilus +Name[ro]=Managerul de fișiere Nautilus +Name[ru]=Файловый менеджер Nautilus +Name[si]=Nautilus ගොනු කළමණාකරු +Name[sk]=Správca súborov Nautilus +Name[sl]=Upravljalnik datotek Nautilus +Name[sq]=Përgjegjësi i Kartelave Nautilus +Name[sr]=Тунар управник датотека +Name[sv]=Filhanteraren Nautilus +Name[te]=తునార్ దస్త్ర నిర్వాహకము +Name[th]=โปรแกรมจัดการแฟ้ม Nautilus +Name[tr]=Nautilus Dosya Yöneticisi +Name[ug]=سۇنار(Nautilus) ھۆججەت باشقۇرغۇ +Name[uk]=Файловий менеджер Nautilus +Name[ur]=تھنر فائل منیجر +Name[ur_PK]=تھنر فائل منیجر +Name[vi]=Trình quản lý tập tin Nautilus +Name[zh_CN]=Nautilus 文件管理器 +Name[zh_HK]=Nautilus 檔案管理員 +Name[zh_TW]=Nautilus 檔案管理員 +Comment=Browse the filesystem with the file manager +Comment[ar]=تصفح ملفات النظام بمدير الملفات +Comment[ast]=Restolar el sistema de ficheros col xestor de ficheros +Comment[be]=Агляд файлавай сістэмы кіраўніком файлаў +Comment[bg]=Преглед на файловата система с файловият мениджър +Comment[bn]=ফাইল ম্যানেজার দিয়ে ফাইলসিস্টেম ব্রাউজ করুন +Comment[ca]=Navegueu pel sistema de fitxers amb el gestor de fitxers +Comment[cs]=Procházet systém souborů správcem souborů +Comment[da]=Gennemse filsystemet med filhåndteringen +Comment[de]=Das Dateisystem in der Dateiverwaltung anzeigen +Comment[el]=Περιήγηση του συστήματος αρχείων με τον διαχειριστή αρχείων +Comment[en_AU]=Browse the filesystem with the file manager +Comment[en_GB]=Browse the filesystem with the file manager +Comment[eo]=Rigardu dosier-sistemon per dosier-administrilo +Comment[es]=Explore el sistema de archivos con el gestor de archivos +Comment[et]=Failisüsteemi lehitsemine kasutades failihaldurit +Comment[eu]=Fitxategi kudeatzaileaz fitxategi sistema arakatu +Comment[fa_IR]=مرور سیستم پرونده با مدیر پرونده +Comment[fi]=Selaa tiedostojärjestelmää tiedostonhallinnassa +Comment[fr]=Parcourir le système de fichiers avec le gestionnaire de fichiers +Comment[gl]=Explorar o sistema de ficheiros co xestor de ficheiros +Comment[he]=סייר במערכת הקבצים בעזרת מנהל הקבצים +Comment[hr]=Pregledaj datotečni sustav sa upraviteljem datoteka +Comment[hu]=A fájlrendszer böngészése a fájlkezelővel +Comment[hy]=Դիտանցնել նշահամակարգը նշերի կառավարչի հետ +Comment[hy_AM]=Դիտանցնել նշահամակարգը նշերի կառավարչի հետ +Comment[id]=Ramban sistem berkas dengan manajer berkas +Comment[ie]=Navigar li sistema de files per li gerente de files +Comment[is]=Vafra um skráarkerfið með skráarstjóranum +Comment[it]=Esplora il file system con il gestore dei file +Comment[ja]=ファイルマネージャーでファイルシステムを参照します +Comment[kk]=Файлдық жүйені файлдар басқарушысымен шолу +Comment[ko]=파일 관리자로 파일 시스템을 탐색합니다 +Comment[lt]=Naršyti failų sistemą naudojant failų tvarkytuvę +Comment[lv]=Pārlūko failu sistēmu ar failu pārvaldnieku +Comment[ms]=Layar sistem fail dengan pengurus fail +Comment[nb]=Utforsk filsystemet med filbehandleren +Comment[nl]=Blader met de bestandbeheerder door het bestandssysteem +Comment[nn]=Bla gjennom filsystemet med filhandsamaren +Comment[oc]=Percórrer lo sistèma de fichièrs amb lo gestionari de fichièrs +Comment[pa]=ਫਾਇਲ ਮੈਨੇਜਰ ਨਾਲ ਫਾਇਲ ਸਿਸਟਮ ਨਾਲ ਬਰਾਊਜ਼ ਕਰੋ +Comment[pl]=Przegląda system plików za pomocą menedżera plików +Comment[pt]=Explorar sistema de ficheiros com o gestor de ficheiros +Comment[pt_BR]=Navegue no sistema de arquivos com o gerenciador de arquivos +Comment[ro]=Gestionați fișierele cu un manager dedicat +Comment[ru]=Просмотр файловой системы с помощью файлового менеджера +Comment[sk]=Prehliada súborový systém pomocou správcu súborov +Comment[sl]=Brskajte po datotečnem sistemu z upravljalnikom datotek +Comment[sq]=Shfletoni sistemin e kartelave me përgjegjësin e kartelave +Comment[sr]=Прегледај систем датотека управником датотека +Comment[sv]=Bläddra i filsystemet med filhanteraren +Comment[te]=దస్త్ర వ్యవస్థని దస్త్ర నిర్వాహకముతో విహరించు +Comment[th]=ท่องดูระบบแฟ้มด้วยโปรแกรมจัดการแฟ้ม +Comment[tr]=Dosya sistemine dosya yöneticisi ile göz atın +Comment[ug]=ھۆججەت باشقۇرغۇدا ھۆججەت سىستېمىسىنى كۆر +Comment[uk]=Перегляд файлової системи менеджером файлів +Comment[ur]=فائل سسٹم کو فائل منیجر سے دیکھیں +Comment[ur_PK]=فائل سسٹم کو فائل منیجر سے دیکھیں +Comment[vi]=Duyệt hê thống tập tin với trình quản lý tập tin +Comment[zh_CN]=用文件管理器浏览文件系统 +Comment[zh_HK]=以檔案管理員瀏覽檔案系統 +Comment[zh_TW]=使用檔案管理員瀏覽檔案系統 +GenericName=File Manager +GenericName[am]=የ ፋይል አስተዳዳሪ +GenericName[ar]=مدير الملفات +GenericName[ast]=Xestor de ficheros +GenericName[be]=Кіраўнік файлаў +GenericName[bg]=Файлов мениджър +GenericName[bn]=ফাইল ব্যবস্থাপক +GenericName[ca]=Gestor de fitxers +GenericName[cs]=Správce souborů +GenericName[da]=Filhåndtering +GenericName[de]=Dateiverwaltung +GenericName[el]=Διαχειριστής αρχείων +GenericName[en_AU]=File Manager +GenericName[en_GB]=File Manager +GenericName[eo]=Dosier-administrilo +GenericName[es]=Gestor de archivos +GenericName[et]=Failihaldur +GenericName[eu]=Fitxategi kudeatzailea +GenericName[fa_IR]=مدیر پرونده +GenericName[fi]=Tiedostonhallinta +GenericName[fr]=Gestionnaire de fichiers +GenericName[gl]=Xestor de ficheiros +GenericName[he]=מנהל קבצים +GenericName[hr]=Upravitelj datotekama +GenericName[hu]=Fájlkezelő +GenericName[hy]=Նիշք +GenericName[hy_AM]=Նիշք +GenericName[id]=Manajer Berkas +GenericName[ie]=Gerente de files +GenericName[is]=Skráastjóri +GenericName[it]=Gestore dei file +GenericName[ja]=ファイルマネージャー +GenericName[kk]=Файлдар басқарушысы +GenericName[ko]=파일 관리자 +GenericName[lt]=Failų tvarkytuvė +GenericName[lv]=Failu pārvaldnieks +GenericName[ms]=Pengurus Fail +GenericName[nb]=Filbehandler +GenericName[nl]=Bestandbeheerder +GenericName[nn]=Filhandsamar +GenericName[oc]=Gestionari de fichièrs +GenericName[pa]=ਫਾਇਲ ਮੈਨੇਜਰ +GenericName[pl]=Menedżer plików +GenericName[pt]=Gestor de ficheiros +GenericName[pt_BR]=Gerenciador de arquivos +GenericName[ro]=Manager de fișiere +GenericName[ru]=Файловый менеджер +GenericName[sk]=Správca súborov +GenericName[sl]=Upravljalnik datotek +GenericName[sq]=Përgjegjës Kartelash +GenericName[sr]=Разгледач датотека +GenericName[sv]=Filhanterare +GenericName[te]=దస్త్ర నిర్వాహకము +GenericName[th]=โปรแกรมจัดการแฟ้ม +GenericName[tr]=Dosya Yöneticisi +GenericName[ug]=ھۆججەت باشقۇرغۇ +GenericName[uk]=Файловий менеджер +GenericName[ur]=فائل منیجر +GenericName[ur_PK]=فائل منیجر +GenericName[vi]=Trình quản lí tập tin +GenericName[zh_CN]=文件管理器 +GenericName[zh_HK]=檔案管理員 +GenericName[zh_TW]=檔案管理員 +Exec=nautilus %F +Icon=Nautilus +Terminal=false +StartupNotify=true +Type=Application +Categories=System;Core;GTK;FileTools;FileManager; +MimeType=inode/directory; +# vi:set encoding=UTF-8: diff --git a/rootfs/usr/share/applications/thunar.desktop b/rootfs/usr/share/applications/thunar.desktop index 2056f01..c1b2427 100644 --- a/rootfs/usr/share/applications/thunar.desktop +++ b/rootfs/usr/share/applications/thunar.desktop @@ -195,5 +195,5 @@ StartupNotify=true Type=Application Categories=System;Core;GTK;FileTools;FileManager; MimeType=inode/directory; - +NoDisplay=true # vi:set encoding=UTF-8: From 700487b63362dbc7982af0fac2d328f6f14f8f38 Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Mon, 15 Aug 2022 23:29:13 -0400 Subject: [PATCH 03/17] Fixing fileshare --- rootfs/etc/xdg/user-dirs.defaults | 2 +- rootfs/startup.sh | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/rootfs/etc/xdg/user-dirs.defaults b/rootfs/etc/xdg/user-dirs.defaults index 875709f..9a54385 100644 --- a/rootfs/etc/xdg/user-dirs.defaults +++ b/rootfs/etc/xdg/user-dirs.defaults @@ -5,7 +5,7 @@ DESKTOP=Desktop DOWNLOAD=Downloads #TEMPLATES=Workspace -PUBLICSHARE=Shared Files +PUBLICSHARE=Workspace/-Shared Files- DOCUMENTS=Workspace #MUSIC="$HOME" #PICTURES="$HOME" diff --git a/rootfs/startup.sh b/rootfs/startup.sh index 78aff7e..ff75e31 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -118,9 +118,7 @@ fi bash /cloud9/configure_desktop.sh & -mkdir -p "/home/$USER/Workspace/-Shared Files-" grep -qxF "/home/$USER/Workspace /workspace none defaults,bind 0 0" /etc/fstab || echo "/home/$USER/Workspace /workspace none defaults,bind 0 0" >> /etc/fstab -grep -qxF "/home/$USER/Shared\ Files /workspace/-Shared\ Files- none defaults,bind 0 0" /etc/fstab || echo "/home/$USER/Shared\ Files /workspace/-Shared\ Files- none defaults,bind 0 0" >> /etc/fstab mount -a # Make directory for bookmarks From e8f762759965e37688ae156624d4377a1fbf3bb2 Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Tue, 16 Aug 2022 22:05:17 -0400 Subject: [PATCH 04/17] Removing files --- Dockerfile | 180 ++++++++++++++++++++++++++++++++++++++++++++++- Dockerfile.amd64 | 179 ---------------------------------------------- Dockerfile.arm64 | 129 --------------------------------- Dockerfile.armhf | 124 -------------------------------- 4 files changed, 179 insertions(+), 433 deletions(-) mode change 120000 => 100644 Dockerfile delete mode 100644 Dockerfile.amd64 delete mode 100644 Dockerfile.arm64 delete mode 100644 Dockerfile.armhf diff --git a/Dockerfile b/Dockerfile deleted file mode 120000 index 0fc2233..0000000 --- a/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -Dockerfile.amd64 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8e8b0dd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,179 @@ +# Built with arch: amd64 flavor: lxde image: ubuntu:20.04 +# +################################################################################ +# base system +################################################################################ + +FROM ubuntu:20.04 as system + +RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; + +# Ca-Certificates +RUN apt update \ + && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ + ca-certificates \ + && apt autoclean -y \ + && apt autoremove -y \ + && rm -rf /var/lib/apt/lists/* + + +# built-in packages +ENV DEBIAN_FRONTEND noninteractive +RUN apt update \ + && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends apt-utils software-properties-common curl \ + apache2-utils man-db manpages-posix manpages-dev manpages-posix-dev \ + && apt update \ + && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ + supervisor nginx sudo net-tools zenity xz-utils \ + dbus-x11 x11-utils alsa-utils \ + mesa-utils libgl1-mesa-dri \ + && apt autoclean -y \ + && apt autoremove -y \ + && rm -rf /var/lib/apt/lists/* + +# install debs error if combine together +RUN apt update \ + && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ + xvfb x11vnc ttf-ubuntu-font-family ttf-wqy-zenhei \ + && apt autoclean -y \ + && apt autoremove -y \ + && rm -rf /var/lib/apt/lists/* + +#RUN apt update \ +# && apt install -y gpg-agent \ +# && curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ +# && (dpkg -i ./google-chrome-stable_current_amd64.deb || apt-get install -fy) \ +# && curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add \ +# && rm google-chrome-stable_current_amd64.deb \ +# && rm -rf /var/lib/apt/lists/* + +# Install Desktop +RUN apt update \ + && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ + xubuntu-desktop gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \ + && apt autoclean -y \ + && apt autoremove -y \ + && rm -rf /var/lib/apt/lists/* + +# tini service manager +ARG TINI_VERSION=v0.18.0 +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /bin/tini +RUN chmod +x /bin/tini + +# ffmpeg +RUN apt update \ + && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ + ffmpeg \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir /usr/local/ffmpeg \ + && ln -s /usr/bin/ffmpeg /usr/local/ffmpeg/ffmpeg + +# python library +COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/ +RUN apt-get update \ + && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ + && apt-get install -y python3-pip python3-dev build-essential \ + && pip3 install setuptools wheel && pip3 install -r /tmp/requirements.txt \ + && ln -s /usr/bin/python3 /usr/local/bin/python \ + && dpkg-query -W -f='${Package}\n' > /tmp/b.txt \ + && apt-get remove -y `diff --changed-group-format='%>' --unchanged-group-format='' /tmp/a.txt /tmp/b.txt | xargs` \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/cache/apt/* /tmp/a.txt /tmp/b.txt + +# Install Additonal Packages +RUN mkdir /cloud9 +COPY rootfs/cloud9/apt-requirements.txt /cloud9/apt-requirements.txt +RUN apt update \ + && grep -v '^#' /cloud9/apt-requirements.txt | xargs apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ + && apt autoclean -y \ + && apt autoremove -y \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir /workspace + +# Clone and install cloud9 +RUN git clone https://github.com/c9/core.git /cloud9/c9sdk +#RUN mkdir -p /cloud9/c9sdk/build /workspace/.ubuntu/.standalone +#RUN ln -sf /workspace/.ubuntu/.standalone /cloud9/c9sdk/build/standalone +RUN /cloud9/c9sdk/scripts/install-sdk.sh +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/ + + +################################################################################ +# builder +################################################################################ +FROM ubuntu:20.04 as builder + + +RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; + + +RUN apt-get update \ + && apt-get install -y --no-install-recommends curl ca-certificates gnupg patch + +# nodejs +RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \ + && apt-get install -y nodejs + +# yarn +RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -y yarn + +# build frontend +COPY web /src/web +RUN cd /src/web \ + && yarn \ + && yarn build +RUN sed -i 's#app/locale/#novnc/app/locale/#' /src/web/dist/static/novnc/app/ui.js + + + +################################################################################ +# merge +################################################################################ +FROM system +LABEL maintainer="info@devindice.com" + +COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ + +RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \ + chmod +x /usr/local/lib/web/frontend/static/websockify/run + +EXPOSE 80 +EXPOSE 9999 + +WORKDIR /workspace +ENV HOME=/home/ubuntu \ + SHELL=/bin/bash +HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1:6079/api/health +ENTRYPOINT ["/startup.sh"] + +# Install Docker +RUN groupadd -g 281 docker +RUN mkdir -p /etc/apt/keyrings +RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg +RUN echo \ + "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 +RUN apt-get update +RUN apt-get -y install nautilus 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 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-merge.deb $(curl -s https://www.sublimemerge.com/download_thanks?target=x64-deb#direct-downloads | grep amd64.deb | grep url | awk -F'"' '{print $2}') +RUN wget -O chrome.deb wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb || true +RUN apt install -y ./beyond-compare.deb ./sublime-text.deb ./sublime-merge.deb ./chrome.deb + +RUN npm -g install sass yuglify + +RUN apt -y remove thunar + +# Copy files +COPY rootfs / +RUN rm -rf /workspace/* diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 deleted file mode 100644 index 8e8b0dd..0000000 --- a/Dockerfile.amd64 +++ /dev/null @@ -1,179 +0,0 @@ -# Built with arch: amd64 flavor: lxde image: ubuntu:20.04 -# -################################################################################ -# base system -################################################################################ - -FROM ubuntu:20.04 as system - -RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; - -# Ca-Certificates -RUN apt update \ - && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ - ca-certificates \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - - -# built-in packages -ENV DEBIAN_FRONTEND noninteractive -RUN apt update \ - && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends apt-utils software-properties-common curl \ - apache2-utils man-db manpages-posix manpages-dev manpages-posix-dev \ - && apt update \ - && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ - supervisor nginx sudo net-tools zenity xz-utils \ - dbus-x11 x11-utils alsa-utils \ - mesa-utils libgl1-mesa-dri \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -# install debs error if combine together -RUN apt update \ - && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ - xvfb x11vnc ttf-ubuntu-font-family ttf-wqy-zenhei \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -#RUN apt update \ -# && apt install -y gpg-agent \ -# && curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ -# && (dpkg -i ./google-chrome-stable_current_amd64.deb || apt-get install -fy) \ -# && curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add \ -# && rm google-chrome-stable_current_amd64.deb \ -# && rm -rf /var/lib/apt/lists/* - -# Install Desktop -RUN apt update \ - && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ - xubuntu-desktop gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -# tini service manager -ARG TINI_VERSION=v0.18.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /bin/tini -RUN chmod +x /bin/tini - -# ffmpeg -RUN apt update \ - && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ - ffmpeg \ - && rm -rf /var/lib/apt/lists/* \ - && mkdir /usr/local/ffmpeg \ - && ln -s /usr/bin/ffmpeg /usr/local/ffmpeg/ffmpeg - -# python library -COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/ -RUN apt-get update \ - && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ - && apt-get install -y python3-pip python3-dev build-essential \ - && pip3 install setuptools wheel && pip3 install -r /tmp/requirements.txt \ - && ln -s /usr/bin/python3 /usr/local/bin/python \ - && dpkg-query -W -f='${Package}\n' > /tmp/b.txt \ - && apt-get remove -y `diff --changed-group-format='%>' --unchanged-group-format='' /tmp/a.txt /tmp/b.txt | xargs` \ - && apt-get autoclean -y \ - && apt-get autoremove -y \ - && rm -rf /var/lib/apt/lists/* \ - && rm -rf /var/cache/apt/* /tmp/a.txt /tmp/b.txt - -# Install Additonal Packages -RUN mkdir /cloud9 -COPY rootfs/cloud9/apt-requirements.txt /cloud9/apt-requirements.txt -RUN apt update \ - && grep -v '^#' /cloud9/apt-requirements.txt | xargs apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -RUN mkdir /workspace - -# Clone and install cloud9 -RUN git clone https://github.com/c9/core.git /cloud9/c9sdk -#RUN mkdir -p /cloud9/c9sdk/build /workspace/.ubuntu/.standalone -#RUN ln -sf /workspace/.ubuntu/.standalone /cloud9/c9sdk/build/standalone -RUN /cloud9/c9sdk/scripts/install-sdk.sh -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/ - - -################################################################################ -# builder -################################################################################ -FROM ubuntu:20.04 as builder - - -RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; - - -RUN apt-get update \ - && apt-get install -y --no-install-recommends curl ca-certificates gnupg patch - -# nodejs -RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \ - && apt-get install -y nodejs - -# yarn -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -y yarn - -# build frontend -COPY web /src/web -RUN cd /src/web \ - && yarn \ - && yarn build -RUN sed -i 's#app/locale/#novnc/app/locale/#' /src/web/dist/static/novnc/app/ui.js - - - -################################################################################ -# merge -################################################################################ -FROM system -LABEL maintainer="info@devindice.com" - -COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ - -RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \ - chmod +x /usr/local/lib/web/frontend/static/websockify/run - -EXPOSE 80 -EXPOSE 9999 - -WORKDIR /workspace -ENV HOME=/home/ubuntu \ - SHELL=/bin/bash -HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1:6079/api/health -ENTRYPOINT ["/startup.sh"] - -# Install Docker -RUN groupadd -g 281 docker -RUN mkdir -p /etc/apt/keyrings -RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg -RUN echo \ - "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 -RUN apt-get update -RUN apt-get -y install nautilus 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 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-merge.deb $(curl -s https://www.sublimemerge.com/download_thanks?target=x64-deb#direct-downloads | grep amd64.deb | grep url | awk -F'"' '{print $2}') -RUN wget -O chrome.deb wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb || true -RUN apt install -y ./beyond-compare.deb ./sublime-text.deb ./sublime-merge.deb ./chrome.deb - -RUN npm -g install sass yuglify - -RUN apt -y remove thunar - -# Copy files -COPY rootfs / -RUN rm -rf /workspace/* diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 deleted file mode 100644 index 8c12efb..0000000 --- a/Dockerfile.arm64 +++ /dev/null @@ -1,129 +0,0 @@ -# Built with arch: arm64 flavor: lxde image: ubuntu:18.04 -# -################################################################################ -# base system -################################################################################ - -# qemu helper for arm build -FROM ubuntu:20.04 as amd64 -RUN apt update && apt install -y qemu-user-static -FROM arm64v8/ubuntu:20.04 as system -COPY --from=amd64 /usr/bin/qemu-aarch64-static /usr/bin/ - - - -RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; - - -# built-in packages -ENV DEBIAN_FRONTEND noninteractive -RUN apt update \ - && apt install -y --no-install-recommends software-properties-common curl apache2-utils \ - && apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - supervisor nginx sudo net-tools zenity xz-utils \ - dbus-x11 x11-utils alsa-utils \ - mesa-utils libgl1-mesa-dri \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* -# install debs error if combine together -RUN apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - xvfb x11vnc \ - vim-tiny firefox chromium-browser ttf-ubuntu-font-family ttf-wqy-zenhei \ - && add-apt-repository -r ppa:fcwu-tw/apps \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -RUN apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - lxde gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - - -# Additional packages require ~600MB -# libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw - -# tini for subreap -ARG TINI_VERSION=v0.18.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-arm64 /bin/tini -RUN chmod +x /bin/tini - -# ffmpeg -RUN apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - ffmpeg \ - && rm -rf /var/lib/apt/lists/* \ - && mkdir /usr/local/ffmpeg \ - && ln -s /usr/bin/ffmpeg /usr/local/ffmpeg/ffmpeg - -# python library -COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/ -RUN apt-get update \ - && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ - && apt-get install -y python3-pip python3-dev build-essential \ - && pip3 install setuptools wheel && pip3 install -r /tmp/requirements.txt \ - && ln -s /usr/bin/python3 /usr/local/bin/python \ - && dpkg-query -W -f='${Package}\n' > /tmp/b.txt \ - && apt-get remove -y `diff --changed-group-format='%>' --unchanged-group-format='' /tmp/a.txt /tmp/b.txt | xargs` \ - && apt-get autoclean -y \ - && apt-get autoremove -y \ - && rm -rf /var/lib/apt/lists/* \ - && rm -rf /var/cache/apt/* /tmp/a.txt /tmp/b.txt - - -################################################################################ -# builder -################################################################################ -FROM ubuntu:20.04 as builder - - -RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; - - -RUN apt-get update \ - && apt-get install -y --no-install-recommends curl ca-certificates gnupg patch - -# nodejs -RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \ - && apt-get install -y nodejs - -# yarn -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -y yarn - -# build frontend -COPY web /src/web -RUN cd /src/web \ - && yarn \ - && yarn build -RUN sed -i 's#app/locale/#novnc/app/locale/#' /src/web/dist/static/novnc/app/ui.js - - -RUN cd /src/web/dist/static/novnc && patch -p0 < /src/web/novnc-armhf-1.patch - - -################################################################################ -# merge -################################################################################ -FROM system -LABEL maintainer="fcwu.tw@gmail.com" - -COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ -COPY rootfs / -RUN ln -sf /usr/local/lib/web/frontend/static/websockify" "/usr/local/lib/web/frontend/static/novnc/utils/websockify && chmod +x /usr/local/lib/web/frontend/static/websockify/run -RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \ - chmod +x /usr/local/lib/web/frontend/static/websockify/run - -EXPOSE 80 -WORKDIR /root -ENV HOME=/home/ubuntu \ - SHELL=/bin/bash -HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1:6079/api/health -ENTRYPOINT ["/startup.sh"] diff --git a/Dockerfile.armhf b/Dockerfile.armhf deleted file mode 100644 index 561bb77..0000000 --- a/Dockerfile.armhf +++ /dev/null @@ -1,124 +0,0 @@ -# Built with arch: armhf flavor: lxde image: ubuntu:18.04 -# -################################################################################ -# base system -################################################################################ - -# qemu helper for arm build -FROM ubuntu:18.04 as amd64 -RUN apt update && apt install -y qemu-user-static -FROM arm32v7/ubuntu:18.04 as system -COPY --from=amd64 /usr/bin/qemu-arm-static /usr/bin/ - - - -RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; - - -# built-in packages -ENV DEBIAN_FRONTEND noninteractive -RUN apt update \ - && apt install -y --no-install-recommends software-properties-common curl apache2-utils \ - && apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - supervisor nginx sudo net-tools zenity xz-utils \ - dbus-x11 x11-utils alsa-utils \ - mesa-utils libgl1-mesa-dri \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* -# install debs error if combine together -RUN add-apt-repository -y ppa:fcwu-tw/apps \ - && apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - xvfb x11vnc=0.9.16-1 \ - vim-tiny firefox chromium-browser ttf-ubuntu-font-family ttf-wqy-zenhei \ - && add-apt-repository -r ppa:fcwu-tw/apps \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -RUN apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - lxde gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - - -# Additional packages require ~600MB -# libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw - -# tini for subreap -ARG TINI_VERSION=v0.18.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-armhf /bin/tini -RUN chmod +x /bin/tini - -# ffmpeg -RUN mkdir -p /usr/local/ffmpeg \ - && curl -sSL https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz | tar xJvf - -C /usr/local/ffmpeg/ --strip 1 - -# python library -COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/ -RUN apt-get update \ - && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ - && apt-get install -y python-pip python-dev build-essential \ - && pip install setuptools wheel && pip install -r /tmp/requirements.txt \ - && dpkg-query -W -f='${Package}\n' > /tmp/b.txt \ - && apt-get remove -y `diff --changed-group-format='%>' --unchanged-group-format='' /tmp/a.txt /tmp/b.txt | xargs` \ - && apt-get autoclean -y \ - && apt-get autoremove -y \ - && rm -rf /var/lib/apt/lists/* \ - && rm -rf /var/cache/apt/* /tmp/a.txt /tmp/b.txt - - -################################################################################ -# builder -################################################################################ -FROM ubuntu:18.04 as builder - - -RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; - - -RUN apt-get update \ - && apt-get install -y --no-install-recommends curl ca-certificates gnupg patch - -# nodejs -RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \ - && apt-get install -y nodejs - -# yarn -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -y yarn - -# build frontend -COPY web /src/web -RUN cd /src/web \ - && yarn \ - && yarn run build -RUN sed -i 's#app/locale/#novnc/app/locale/#' /src/web/dist/static/novnc/app/ui.js - -RUN cd /src/web/dist/static/novnc && patch -p0 < /src/web/novnc-armhf-1.patch - - -################################################################################ -# merge -################################################################################ -FROM system -LABEL maintainer="fcwu.tw@gmail.com" - -COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ -COPY rootfs / -RUN ln -sf /usr/local/lib/web/frontend/static/websockify" "/usr/local/lib/web/frontend/static/novnc/utils/websockify && chmod +x /usr/local/lib/web/frontend/static/websockify/run -RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \ - chmod +x /usr/local/lib/web/frontend/static/websockify/run - -EXPOSE 80 -WORKDIR /root -ENV HOME=/home/ubuntu \ - SHELL=/bin/bash -HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1:6079/api/health -ENTRYPOINT ["/startup.sh"] From e68fe8248144ff5a9fdb45236979f8e3e2f9fac0 Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Tue, 16 Aug 2022 22:09:26 -0400 Subject: [PATCH 05/17] Adding Pipeline --- .semaphore/pipeline_2.yml | 22 ++++++++++++++++++++++ .semaphore/pipeline_3.yml | 26 ++++++++++++++++++++++++++ .semaphore/semaphore.yml | 24 ++++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 .semaphore/pipeline_2.yml create mode 100644 .semaphore/pipeline_3.yml create mode 100644 .semaphore/semaphore.yml diff --git a/.semaphore/pipeline_2.yml b/.semaphore/pipeline_2.yml new file mode 100644 index 0000000..21da1b0 --- /dev/null +++ b/.semaphore/pipeline_2.yml @@ -0,0 +1,22 @@ +version: v1.0 +name: Deploy Release Candidate +agent: + machine: + type: e1-standard-2 + os_image: ubuntu2004 +blocks: + - name: RC Build + task: + jobs: + - name: Build and Push + commands: + - checkout + - git submodule update --init --recursive + - 'docker pull $DOCKER_USERNAME/cloud9-ide-vdi:latest || true' + - 'docker build --cache-from=$DOCKER_USERNAME/cloud9-ide-vdi:latest -t devindice/cloud9-ide-vdi .' + - '# Login to Dockerhub' + - 'echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin' + - '# Create a version' + - 'docker push $DOCKER_USERNAME/cloud9-ide-vdi:testing' + secrets: + - name: Dockerhub diff --git a/.semaphore/pipeline_3.yml b/.semaphore/pipeline_3.yml new file mode 100644 index 0000000..e4c8889 --- /dev/null +++ b/.semaphore/pipeline_3.yml @@ -0,0 +1,26 @@ +version: v1.0 +name: Deploy Production +agent: + machine: + type: e1-standard-2 + os_image: ubuntu2004 +blocks: + - name: Production Build + task: + jobs: + - name: Tag and Push + commands: + - checkout + - git submodule update --init --recursive + - DATE=$(date +%y%U%u) + - 'VERSION="${DATE}"' + - 'docker pull $DOCKER_USERNAME/cloud9-ide-vdi:latest || true' + - 'docker build --cache-from=$DOCKER_USERNAME/cloud9-ide-vdi:latest -t devindice/cloud9-ide-vdi .' + - '# Login to Dockerhub' + - 'echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin' + - '# Create a version' + - 'docker image tag devindice/cloud9-ide-vdi:latest devindice/cloud9-ide-vdi:$VERSION' + - 'docker push $DOCKER_USERNAME/cloud9-ide-vdi:$VERSION' + - 'docker push $DOCKER_USERNAME/cloud9-ide-vdi:latest' + secrets: + - name: Dockerhub diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml new file mode 100644 index 0000000..a50ef42 --- /dev/null +++ b/.semaphore/semaphore.yml @@ -0,0 +1,24 @@ +version: v1.0 +name: Initial Pipeline +agent: + machine: + type: e1-standard-2 + os_image: ubuntu2004 +blocks: + - name: Setup + task: + jobs: + - name: Checkout + commands: + - checkout + secrets: + - name: Dockerhub +promotions: + - name: Deploy Release Candidate + pipeline_file: pipeline_2.yml + auto_promote: + when: branch = 'release' AND result = 'passed' + - name: Deploy Production + pipeline_file: pipeline_3.yml + auto_promote: + when: branch = 'master' AND result = 'passed' From 62a8d697e46f72c8b2e35cc28d5660b6b0235ff7 Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Wed, 17 Aug 2022 02:27:44 +0000 Subject: [PATCH 06/17] Update Semaphore configuration --- .semaphore/pipeline_2.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.semaphore/pipeline_2.yml b/.semaphore/pipeline_2.yml index 21da1b0..80e578c 100644 --- a/.semaphore/pipeline_2.yml +++ b/.semaphore/pipeline_2.yml @@ -17,6 +17,7 @@ blocks: - '# Login to Dockerhub' - 'echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin' - '# Create a version' + - 'docker image tag devindice/cloud9-ide-vdi:latest devindice/cloud9-ide-vdi:testing' - 'docker push $DOCKER_USERNAME/cloud9-ide-vdi:testing' secrets: - name: Dockerhub From 37c9c05dc5b7ce33df40df837f40e646ef9a5018 Mon Sep 17 00:00:00 2001 From: Kyle Hibbard Date: Wed, 17 Aug 2022 09:33:46 -0400 Subject: [PATCH 07/17] Testing Sleep in Startup --- rootfs/startup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rootfs/startup.sh b/rootfs/startup.sh index ff75e31..c0c4ba5 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -1,4 +1,7 @@ #!/bin/bash + +sleep 6000 + if [ -n "$VNC_PASSWORD" ]; then echo -n "$VNC_PASSWORD" > /.password1 x11vnc -storepasswd $(cat /.password1) /.password2 From 25cc9d2ca2b6697f420ef1a2e7e45183699a52ac Mon Sep 17 00:00:00 2001 From: Kyle Hibbard Date: Wed, 17 Aug 2022 10:30:13 -0400 Subject: [PATCH 08/17] Moving Sleep for Testing --- rootfs/startup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rootfs/startup.sh b/rootfs/startup.sh index c0c4ba5..468a3e6 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -1,7 +1,5 @@ #!/bin/bash -sleep 6000 - if [ -n "$VNC_PASSWORD" ]; then echo -n "$VNC_PASSWORD" > /.password1 x11vnc -storepasswd $(cat /.password1) /.password2 @@ -137,4 +135,6 @@ grep "127.0.0.1 archive.linux.duke.edu" /etc/hosts || echo "127.0.0.1 archive.li chown -R $USER:$USER /home/$USER/ +sleep 6000 + exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf From 6d7e0b8cf4d0020a653eb3b4d0eb0dde7a434404 Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Wed, 17 Aug 2022 11:58:57 -0400 Subject: [PATCH 09/17] Adding directory --- rootfs/startup.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rootfs/startup.sh b/rootfs/startup.sh index 468a3e6..e40eade 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -119,6 +119,7 @@ fi bash /cloud9/configure_desktop.sh & +mkdir -p /home/$USER/Workspace/-Shared\ Files- grep -qxF "/home/$USER/Workspace /workspace none defaults,bind 0 0" /etc/fstab || echo "/home/$USER/Workspace /workspace none defaults,bind 0 0" >> /etc/fstab mount -a @@ -128,13 +129,11 @@ mkdir -p /home/$USER/.config/gtk-3.0 # Keep these bookmarks grep "file:///home/$USER/Documents" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Documents" >> /home/$USER/.config/gtk-3.0/bookmarks grep "file:///home/$USER/Workspace" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Workspace" >> /home/$USER/.config/gtk-3.0/bookmarks -grep "file:///home/$USER/Workspace/Shared%20Files" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Workspace/Shared%20Files" >> /home/$USER/.config/gtk-3.0/bookmarks +grep "file:///home/$USER/Workspace/Shared%20Files" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Workspace/-Shared%20Files-" >> /home/$USER/.config/gtk-3.0/bookmarks grep "file:///home/$USER/Downloads" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Downloads" >> /home/$USER/.config/gtk-3.0/bookmarks grep "127.0.0.1 archive.linux.duke.edu" /etc/hosts || echo "127.0.0.1 archive.linux.duke.edu" >> /etc/hosts chown -R $USER:$USER /home/$USER/ -sleep 6000 - exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf From d859302bfba0671631020238cb292ac19c9ebce6 Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Sun, 14 Aug 2022 00:43:22 -0400 Subject: [PATCH 10/17] Reconfigured users home directory --- Dockerfile.amd64 | 10 +++-- rootfs/cloud9/configure_desktop.sh | 1 - rootfs/etc/supervisor/conf.d/supervisord.conf | 2 +- rootfs/startup.sh | 38 +++++++++++++------ rootfs/usr/share/backgrounds/dynamic.sh | 1 - 5 files changed, 33 insertions(+), 19 deletions(-) diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index 5d05641..2d177f6 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -95,8 +95,8 @@ RUN mkdir /workspace # Clone and install cloud9 RUN git clone https://github.com/c9/core.git /cloud9/c9sdk -RUN mkdir -p /cloud9/c9sdk/build /workspace/.ubuntu/.standalone -RUN ln -sf /workspace/.ubuntu/.standalone /cloud9/c9sdk/build/standalone +#RUN mkdir -p /cloud9/c9sdk/build /workspace/.ubuntu/.standalone +#RUN ln -sf /workspace/.ubuntu/.standalone /cloud9/c9sdk/build/standalone RUN /cloud9/c9sdk/scripts/install-sdk.sh 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/ @@ -161,7 +161,8 @@ RUN echo \ "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 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 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 # Copy files -COPY rootfs / \ No newline at end of file +COPY rootfs / +RUN rm -rf /workspace/* \ No newline at end of file diff --git a/rootfs/cloud9/configure_desktop.sh b/rootfs/cloud9/configure_desktop.sh index 37f68e6..72eb475 100644 --- a/rootfs/cloud9/configure_desktop.sh +++ b/rootfs/cloud9/configure_desktop.sh @@ -11,7 +11,6 @@ sleep 5 DBUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-) echo "DBUS Session Address: $DBUS_ADDRESS" -echo "$DBUS_ADDRESS" > /var/log/dbus.txt export DBUS_SESSION_BUS_ADDRESS export DISPLAY=:1.0 diff --git a/rootfs/etc/supervisor/conf.d/supervisord.conf b/rootfs/etc/supervisor/conf.d/supervisord.conf index 970d49d..df60d06 100644 --- a/rootfs/etc/supervisor/conf.d/supervisord.conf +++ b/rootfs/etc/supervisor/conf.d/supervisord.conf @@ -50,6 +50,6 @@ command=bash -c 'while ps aux | grep user-install.sh | grep -v grep 2>&1> /dev/n [program:desktop] priority=30 -directory=/workspace/.ubuntu/dynamic-background/active +directory=/home/%USER%/.dynamic-background/active user=%USER% command=bash /usr/share/backgrounds/dynamic.sh \ No newline at end of file diff --git a/rootfs/startup.sh b/rootfs/startup.sh index e79999e..89db59e 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -31,7 +31,8 @@ USER=${USER:-root} HOME=/root if [ "$USER" != "root" ]; then 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 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) fi - HOME=/workspace/.home/$USER + #HOME=/workspace/.home/$USER + HOME=/home/$USER echo "$USER:$PASSWORD" | chpasswd cp -r /root/{.config,.gtkrc-2.0,.asoundrc} ${HOME} chown -R $USER:$USER ${HOME} @@ -86,27 +88,39 @@ if [ -n "$DOMAIN" ]; then fi # 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) -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> /workspace/.c9/install.log & +#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 & # Only for testing while editing the menu -chown $USER /usr/share/applications/ +#chown $USER /usr/share/applications/ # 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 - 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 -if [ ! "$(ls -A /workspace/.ubuntu/dynamic-background/active/ )" ]; then - cp -r /usr/share/backgrounds/dynamic-background/default/* /workspace/.ubuntu/dynamic-background/active +if [ ! "$(ls -A /home/$USER/.dynamic-background/active/ )" ]; then + cp -r /usr/share/backgrounds/dynamic-background/default/* /home/$USER/.dynamic-background/active/ fi 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 \ No newline at end of file diff --git a/rootfs/usr/share/backgrounds/dynamic.sh b/rootfs/usr/share/backgrounds/dynamic.sh index 39f43db..54396c5 100644 --- a/rootfs/usr/share/backgrounds/dynamic.sh +++ b/rootfs/usr/share/backgrounds/dynamic.sh @@ -1,5 +1,4 @@ OLD_FILE="" -DBUS_FILE="/var/log/dbus.txt" DIR=$(pwd) export DISPLAY=:1.0 From 7878a4a5c302e83299258d13c8f344dd8b44ca68 Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Mon, 15 Aug 2022 23:06:26 -0400 Subject: [PATCH 11/17] Fixing directories after change of file manager --- Dockerfile.amd64 | 6 +- rootfs/etc/skel/.config/xfce4/helpers.rc | 4 + rootfs/etc/xdg/user-dirs.defaults | 6 +- rootfs/startup.sh | 33 ++- .../usr/share/applications/nautilus.desktop | 198 ++++++++++++++++++ rootfs/usr/share/applications/thunar.desktop | 2 +- 6 files changed, 233 insertions(+), 16 deletions(-) create mode 100644 rootfs/etc/skel/.config/xfce4/helpers.rc create mode 100644 rootfs/usr/share/applications/nautilus.desktop diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index 2d177f6..8e8b0dd 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -161,7 +161,7 @@ RUN echo \ "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 RUN apt-get update -RUN apt-get -y install menulibre python3-pip keychain python3.8-venv strace gedit gvfs-backends +RUN apt-get -y install nautilus 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') @@ -172,6 +172,8 @@ RUN apt install -y ./beyond-compare.deb ./sublime-text.deb ./sublime-merge.deb . RUN npm -g install sass yuglify +RUN apt -y remove thunar + # Copy files COPY rootfs / -RUN rm -rf /workspace/* \ No newline at end of file +RUN rm -rf /workspace/* diff --git a/rootfs/etc/skel/.config/xfce4/helpers.rc b/rootfs/etc/skel/.config/xfce4/helpers.rc new file mode 100644 index 0000000..f9ac46e --- /dev/null +++ b/rootfs/etc/skel/.config/xfce4/helpers.rc @@ -0,0 +1,4 @@ +FileManager=nautilus +WebBrowser=google-chrome +TerminalEmulator=xfce4-terminal + diff --git a/rootfs/etc/xdg/user-dirs.defaults b/rootfs/etc/xdg/user-dirs.defaults index 8e4c0d0..875709f 100644 --- a/rootfs/etc/xdg/user-dirs.defaults +++ b/rootfs/etc/xdg/user-dirs.defaults @@ -4,9 +4,9 @@ # will be translated on a per-path-element basis into the users locale DESKTOP=Desktop DOWNLOAD=Downloads -TEMPLATES=Workspace -PUBLICSHARE=Workspace/Company Files -DOCUMENTS=Documents +#TEMPLATES=Workspace +PUBLICSHARE=Shared Files +DOCUMENTS=Workspace #MUSIC="$HOME" #PICTURES="$HOME" #VIDEOS="$HOME" diff --git a/rootfs/startup.sh b/rootfs/startup.sh index 89db59e..78aff7e 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -51,6 +51,13 @@ if [ "$USER" != "root" ]; then fi sed -i -e "s|%USER%|$USER|" -e "s|%HOME%|$HOME|" /etc/supervisor/conf.d/supervisord.conf +#mkdir -r /home/$USER/.config/ +# Set the default file manager +#grep "FileManager" /home/$USER/.config/xfce4-helpers.rc && sed -i "/FileManager/c\FileManager=nautilus" || echo "FileManager=nautilus" >> /home/$USER/.config/xfce4-helpers.rc +# Set the default web browser if it does not exist +#grep "WebBrowser" /home/$USER/.config/xfce4-helpers.rc || echo "WebBrowser=google-chrome" >> /home/$USER/.config/xfce4-helpers.rc +#chown -R $USER:$USER /home/$USER/.config + # nginx workers sed -i 's|worker_processes .*|worker_processes 1;|' /etc/nginx/nginx.conf @@ -111,16 +118,22 @@ fi 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 +mkdir -p "/home/$USER/Workspace/-Shared Files-" +grep -qxF "/home/$USER/Workspace /workspace none defaults,bind 0 0" /etc/fstab || echo "/home/$USER/Workspace /workspace none defaults,bind 0 0" >> /etc/fstab +grep -qxF "/home/$USER/Shared\ Files /workspace/-Shared\ Files- none defaults,bind 0 0" /etc/fstab || echo "/home/$USER/Shared\ Files /workspace/-Shared\ Files- 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 +# Make directory for bookmarks +mkdir -p /home/$USER/.config/gtk-3.0 -exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf \ No newline at end of file +# Keep these bookmarks +grep "file:///home/$USER/Documents" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Documents" >> /home/$USER/.config/gtk-3.0/bookmarks +grep "file:///home/$USER/Workspace" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Workspace" >> /home/$USER/.config/gtk-3.0/bookmarks +grep "file:///home/$USER/Workspace/Shared%20Files" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Workspace/Shared%20Files" >> /home/$USER/.config/gtk-3.0/bookmarks +grep "file:///home/$USER/Downloads" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Downloads" >> /home/$USER/.config/gtk-3.0/bookmarks + +grep "127.0.0.1 archive.linux.duke.edu" /etc/hosts || echo "127.0.0.1 archive.linux.duke.edu" >> /etc/hosts + +chown -R $USER:$USER /home/$USER/ + +exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf diff --git a/rootfs/usr/share/applications/nautilus.desktop b/rootfs/usr/share/applications/nautilus.desktop new file mode 100644 index 0000000..94f0d9a --- /dev/null +++ b/rootfs/usr/share/applications/nautilus.desktop @@ -0,0 +1,198 @@ +[Desktop Entry] +Name=Nautilus File Manager +Name[am]=ቱናር መዝገብ አስተዳዳሪ +Name[ar]=مدير الملفات ثونار +Name[ast]=Xestor de ficheros Nautilus +Name[be]=Кіраўнік файлаў Nautilus +Name[bg]=Файлов мениджър Nautilus +Name[bn]=Nautilus ফাইল ম্যানেজার +Name[ca]=Gestor de fitxers Nautilus +Name[cs]=Správce souborů Nautilus +Name[da]=Nautilus Filhåndtering +Name[de]=Nautilus-Dateiverwaltung +Name[el]=Διαχειριστής αρχείων Nautilus +Name[en_AU]=Nautilus File Manager +Name[en_GB]=Nautilus File Manager +Name[eo]=Nautilus dosier-administrilo +Name[es]=Gestor de archivos Nautilus +Name[et]=Failihaldur Nautilus +Name[eu]=Nautilus fitxategi kudeatzailea +Name[fa_IR]=مدیر پرونده‌های تونار +Name[fi]=Nautilus-tiedostonhallinta +Name[fr]=Gestionnaire de fichiers Nautilus +Name[gl]=Xestor de ficheiros Nautilus +Name[he]=מנהל קבצים Nautilus +Name[hr]=Nautilus upravitelj datotekama +Name[hu]=Nautilus fájlkezelő +Name[hy]=Nautilus նիշք +Name[hy_AM]=Nautilus նիշք +Name[id]=Manajer Berkas Nautilus +Name[ie]=Gerente de files Nautilus +Name[is]=Nautilus skráastjóri +Name[it]=Il gestore dei file Nautilus +Name[ja]=Nautilus ファイルマネージャー +Name[kk]=Nautilus файлдар басқарушысы +Name[ko]=투나 파일 관리자 +Name[lt]=Nautilus failų tvarkytuvė +Name[lv]=Nautilus failu pārvaldnieks +Name[ms]=Pengurus Fail Nautilus +Name[nb]=Nautilus Filbehandler +Name[nl]=Nautilus bestandbeheerder +Name[nn]=Nautilus filhandsaming +Name[oc]=Gestionari de Fichièrs Nautilus +Name[pa]=ਥੰਨਰ ਫਾਇਲ ਮੈਨੇਜਰ +Name[pl]=Menedżer plików Nautilus +Name[pt]=Gestor de ficheiros Nautilus +Name[pt_BR]=Gerenciador de arquivos Nautilus +Name[ro]=Managerul de fișiere Nautilus +Name[ru]=Файловый менеджер Nautilus +Name[si]=Nautilus ගොනු කළමණාකරු +Name[sk]=Správca súborov Nautilus +Name[sl]=Upravljalnik datotek Nautilus +Name[sq]=Përgjegjësi i Kartelave Nautilus +Name[sr]=Тунар управник датотека +Name[sv]=Filhanteraren Nautilus +Name[te]=తునార్ దస్త్ర నిర్వాహకము +Name[th]=โปรแกรมจัดการแฟ้ม Nautilus +Name[tr]=Nautilus Dosya Yöneticisi +Name[ug]=سۇنار(Nautilus) ھۆججەت باشقۇرغۇ +Name[uk]=Файловий менеджер Nautilus +Name[ur]=تھنر فائل منیجر +Name[ur_PK]=تھنر فائل منیجر +Name[vi]=Trình quản lý tập tin Nautilus +Name[zh_CN]=Nautilus 文件管理器 +Name[zh_HK]=Nautilus 檔案管理員 +Name[zh_TW]=Nautilus 檔案管理員 +Comment=Browse the filesystem with the file manager +Comment[ar]=تصفح ملفات النظام بمدير الملفات +Comment[ast]=Restolar el sistema de ficheros col xestor de ficheros +Comment[be]=Агляд файлавай сістэмы кіраўніком файлаў +Comment[bg]=Преглед на файловата система с файловият мениджър +Comment[bn]=ফাইল ম্যানেজার দিয়ে ফাইলসিস্টেম ব্রাউজ করুন +Comment[ca]=Navegueu pel sistema de fitxers amb el gestor de fitxers +Comment[cs]=Procházet systém souborů správcem souborů +Comment[da]=Gennemse filsystemet med filhåndteringen +Comment[de]=Das Dateisystem in der Dateiverwaltung anzeigen +Comment[el]=Περιήγηση του συστήματος αρχείων με τον διαχειριστή αρχείων +Comment[en_AU]=Browse the filesystem with the file manager +Comment[en_GB]=Browse the filesystem with the file manager +Comment[eo]=Rigardu dosier-sistemon per dosier-administrilo +Comment[es]=Explore el sistema de archivos con el gestor de archivos +Comment[et]=Failisüsteemi lehitsemine kasutades failihaldurit +Comment[eu]=Fitxategi kudeatzaileaz fitxategi sistema arakatu +Comment[fa_IR]=مرور سیستم پرونده با مدیر پرونده +Comment[fi]=Selaa tiedostojärjestelmää tiedostonhallinnassa +Comment[fr]=Parcourir le système de fichiers avec le gestionnaire de fichiers +Comment[gl]=Explorar o sistema de ficheiros co xestor de ficheiros +Comment[he]=סייר במערכת הקבצים בעזרת מנהל הקבצים +Comment[hr]=Pregledaj datotečni sustav sa upraviteljem datoteka +Comment[hu]=A fájlrendszer böngészése a fájlkezelővel +Comment[hy]=Դիտանցնել նշահամակարգը նշերի կառավարչի հետ +Comment[hy_AM]=Դիտանցնել նշահամակարգը նշերի կառավարչի հետ +Comment[id]=Ramban sistem berkas dengan manajer berkas +Comment[ie]=Navigar li sistema de files per li gerente de files +Comment[is]=Vafra um skráarkerfið með skráarstjóranum +Comment[it]=Esplora il file system con il gestore dei file +Comment[ja]=ファイルマネージャーでファイルシステムを参照します +Comment[kk]=Файлдық жүйені файлдар басқарушысымен шолу +Comment[ko]=파일 관리자로 파일 시스템을 탐색합니다 +Comment[lt]=Naršyti failų sistemą naudojant failų tvarkytuvę +Comment[lv]=Pārlūko failu sistēmu ar failu pārvaldnieku +Comment[ms]=Layar sistem fail dengan pengurus fail +Comment[nb]=Utforsk filsystemet med filbehandleren +Comment[nl]=Blader met de bestandbeheerder door het bestandssysteem +Comment[nn]=Bla gjennom filsystemet med filhandsamaren +Comment[oc]=Percórrer lo sistèma de fichièrs amb lo gestionari de fichièrs +Comment[pa]=ਫਾਇਲ ਮੈਨੇਜਰ ਨਾਲ ਫਾਇਲ ਸਿਸਟਮ ਨਾਲ ਬਰਾਊਜ਼ ਕਰੋ +Comment[pl]=Przegląda system plików za pomocą menedżera plików +Comment[pt]=Explorar sistema de ficheiros com o gestor de ficheiros +Comment[pt_BR]=Navegue no sistema de arquivos com o gerenciador de arquivos +Comment[ro]=Gestionați fișierele cu un manager dedicat +Comment[ru]=Просмотр файловой системы с помощью файлового менеджера +Comment[sk]=Prehliada súborový systém pomocou správcu súborov +Comment[sl]=Brskajte po datotečnem sistemu z upravljalnikom datotek +Comment[sq]=Shfletoni sistemin e kartelave me përgjegjësin e kartelave +Comment[sr]=Прегледај систем датотека управником датотека +Comment[sv]=Bläddra i filsystemet med filhanteraren +Comment[te]=దస్త్ర వ్యవస్థని దస్త్ర నిర్వాహకముతో విహరించు +Comment[th]=ท่องดูระบบแฟ้มด้วยโปรแกรมจัดการแฟ้ม +Comment[tr]=Dosya sistemine dosya yöneticisi ile göz atın +Comment[ug]=ھۆججەت باشقۇرغۇدا ھۆججەت سىستېمىسىنى كۆر +Comment[uk]=Перегляд файлової системи менеджером файлів +Comment[ur]=فائل سسٹم کو فائل منیجر سے دیکھیں +Comment[ur_PK]=فائل سسٹم کو فائل منیجر سے دیکھیں +Comment[vi]=Duyệt hê thống tập tin với trình quản lý tập tin +Comment[zh_CN]=用文件管理器浏览文件系统 +Comment[zh_HK]=以檔案管理員瀏覽檔案系統 +Comment[zh_TW]=使用檔案管理員瀏覽檔案系統 +GenericName=File Manager +GenericName[am]=የ ፋይል አስተዳዳሪ +GenericName[ar]=مدير الملفات +GenericName[ast]=Xestor de ficheros +GenericName[be]=Кіраўнік файлаў +GenericName[bg]=Файлов мениджър +GenericName[bn]=ফাইল ব্যবস্থাপক +GenericName[ca]=Gestor de fitxers +GenericName[cs]=Správce souborů +GenericName[da]=Filhåndtering +GenericName[de]=Dateiverwaltung +GenericName[el]=Διαχειριστής αρχείων +GenericName[en_AU]=File Manager +GenericName[en_GB]=File Manager +GenericName[eo]=Dosier-administrilo +GenericName[es]=Gestor de archivos +GenericName[et]=Failihaldur +GenericName[eu]=Fitxategi kudeatzailea +GenericName[fa_IR]=مدیر پرونده +GenericName[fi]=Tiedostonhallinta +GenericName[fr]=Gestionnaire de fichiers +GenericName[gl]=Xestor de ficheiros +GenericName[he]=מנהל קבצים +GenericName[hr]=Upravitelj datotekama +GenericName[hu]=Fájlkezelő +GenericName[hy]=Նիշք +GenericName[hy_AM]=Նիշք +GenericName[id]=Manajer Berkas +GenericName[ie]=Gerente de files +GenericName[is]=Skráastjóri +GenericName[it]=Gestore dei file +GenericName[ja]=ファイルマネージャー +GenericName[kk]=Файлдар басқарушысы +GenericName[ko]=파일 관리자 +GenericName[lt]=Failų tvarkytuvė +GenericName[lv]=Failu pārvaldnieks +GenericName[ms]=Pengurus Fail +GenericName[nb]=Filbehandler +GenericName[nl]=Bestandbeheerder +GenericName[nn]=Filhandsamar +GenericName[oc]=Gestionari de fichièrs +GenericName[pa]=ਫਾਇਲ ਮੈਨੇਜਰ +GenericName[pl]=Menedżer plików +GenericName[pt]=Gestor de ficheiros +GenericName[pt_BR]=Gerenciador de arquivos +GenericName[ro]=Manager de fișiere +GenericName[ru]=Файловый менеджер +GenericName[sk]=Správca súborov +GenericName[sl]=Upravljalnik datotek +GenericName[sq]=Përgjegjës Kartelash +GenericName[sr]=Разгледач датотека +GenericName[sv]=Filhanterare +GenericName[te]=దస్త్ర నిర్వాహకము +GenericName[th]=โปรแกรมจัดการแฟ้ม +GenericName[tr]=Dosya Yöneticisi +GenericName[ug]=ھۆججەت باشقۇرغۇ +GenericName[uk]=Файловий менеджер +GenericName[ur]=فائل منیجر +GenericName[ur_PK]=فائل منیجر +GenericName[vi]=Trình quản lí tập tin +GenericName[zh_CN]=文件管理器 +GenericName[zh_HK]=檔案管理員 +GenericName[zh_TW]=檔案管理員 +Exec=nautilus %F +Icon=Nautilus +Terminal=false +StartupNotify=true +Type=Application +Categories=System;Core;GTK;FileTools;FileManager; +MimeType=inode/directory; +# vi:set encoding=UTF-8: diff --git a/rootfs/usr/share/applications/thunar.desktop b/rootfs/usr/share/applications/thunar.desktop index 2056f01..c1b2427 100644 --- a/rootfs/usr/share/applications/thunar.desktop +++ b/rootfs/usr/share/applications/thunar.desktop @@ -195,5 +195,5 @@ StartupNotify=true Type=Application Categories=System;Core;GTK;FileTools;FileManager; MimeType=inode/directory; - +NoDisplay=true # vi:set encoding=UTF-8: From 40d10bdb10741b49f32c422a14da82862d6ffb8b Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Mon, 15 Aug 2022 23:29:13 -0400 Subject: [PATCH 12/17] Fixing fileshare --- rootfs/etc/xdg/user-dirs.defaults | 2 +- rootfs/startup.sh | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/rootfs/etc/xdg/user-dirs.defaults b/rootfs/etc/xdg/user-dirs.defaults index 875709f..9a54385 100644 --- a/rootfs/etc/xdg/user-dirs.defaults +++ b/rootfs/etc/xdg/user-dirs.defaults @@ -5,7 +5,7 @@ DESKTOP=Desktop DOWNLOAD=Downloads #TEMPLATES=Workspace -PUBLICSHARE=Shared Files +PUBLICSHARE=Workspace/-Shared Files- DOCUMENTS=Workspace #MUSIC="$HOME" #PICTURES="$HOME" diff --git a/rootfs/startup.sh b/rootfs/startup.sh index 78aff7e..ff75e31 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -118,9 +118,7 @@ fi bash /cloud9/configure_desktop.sh & -mkdir -p "/home/$USER/Workspace/-Shared Files-" grep -qxF "/home/$USER/Workspace /workspace none defaults,bind 0 0" /etc/fstab || echo "/home/$USER/Workspace /workspace none defaults,bind 0 0" >> /etc/fstab -grep -qxF "/home/$USER/Shared\ Files /workspace/-Shared\ Files- none defaults,bind 0 0" /etc/fstab || echo "/home/$USER/Shared\ Files /workspace/-Shared\ Files- none defaults,bind 0 0" >> /etc/fstab mount -a # Make directory for bookmarks From 03f23a17b2d650f03cf9d38506fb964152401793 Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Tue, 16 Aug 2022 22:05:17 -0400 Subject: [PATCH 13/17] Removing files --- Dockerfile | 180 ++++++++++++++++++++++++++++++++++++++++++++++- Dockerfile.amd64 | 179 ---------------------------------------------- Dockerfile.arm64 | 129 --------------------------------- Dockerfile.armhf | 124 -------------------------------- 4 files changed, 179 insertions(+), 433 deletions(-) mode change 120000 => 100644 Dockerfile delete mode 100644 Dockerfile.amd64 delete mode 100644 Dockerfile.arm64 delete mode 100644 Dockerfile.armhf diff --git a/Dockerfile b/Dockerfile deleted file mode 120000 index 0fc2233..0000000 --- a/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -Dockerfile.amd64 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8e8b0dd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,179 @@ +# Built with arch: amd64 flavor: lxde image: ubuntu:20.04 +# +################################################################################ +# base system +################################################################################ + +FROM ubuntu:20.04 as system + +RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; + +# Ca-Certificates +RUN apt update \ + && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ + ca-certificates \ + && apt autoclean -y \ + && apt autoremove -y \ + && rm -rf /var/lib/apt/lists/* + + +# built-in packages +ENV DEBIAN_FRONTEND noninteractive +RUN apt update \ + && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends apt-utils software-properties-common curl \ + apache2-utils man-db manpages-posix manpages-dev manpages-posix-dev \ + && apt update \ + && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ + supervisor nginx sudo net-tools zenity xz-utils \ + dbus-x11 x11-utils alsa-utils \ + mesa-utils libgl1-mesa-dri \ + && apt autoclean -y \ + && apt autoremove -y \ + && rm -rf /var/lib/apt/lists/* + +# install debs error if combine together +RUN apt update \ + && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ + xvfb x11vnc ttf-ubuntu-font-family ttf-wqy-zenhei \ + && apt autoclean -y \ + && apt autoremove -y \ + && rm -rf /var/lib/apt/lists/* + +#RUN apt update \ +# && apt install -y gpg-agent \ +# && curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ +# && (dpkg -i ./google-chrome-stable_current_amd64.deb || apt-get install -fy) \ +# && curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add \ +# && rm google-chrome-stable_current_amd64.deb \ +# && rm -rf /var/lib/apt/lists/* + +# Install Desktop +RUN apt update \ + && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ + xubuntu-desktop gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \ + && apt autoclean -y \ + && apt autoremove -y \ + && rm -rf /var/lib/apt/lists/* + +# tini service manager +ARG TINI_VERSION=v0.18.0 +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /bin/tini +RUN chmod +x /bin/tini + +# ffmpeg +RUN apt update \ + && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ + ffmpeg \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir /usr/local/ffmpeg \ + && ln -s /usr/bin/ffmpeg /usr/local/ffmpeg/ffmpeg + +# python library +COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/ +RUN apt-get update \ + && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ + && apt-get install -y python3-pip python3-dev build-essential \ + && pip3 install setuptools wheel && pip3 install -r /tmp/requirements.txt \ + && ln -s /usr/bin/python3 /usr/local/bin/python \ + && dpkg-query -W -f='${Package}\n' > /tmp/b.txt \ + && apt-get remove -y `diff --changed-group-format='%>' --unchanged-group-format='' /tmp/a.txt /tmp/b.txt | xargs` \ + && apt-get autoclean -y \ + && apt-get autoremove -y \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/cache/apt/* /tmp/a.txt /tmp/b.txt + +# Install Additonal Packages +RUN mkdir /cloud9 +COPY rootfs/cloud9/apt-requirements.txt /cloud9/apt-requirements.txt +RUN apt update \ + && grep -v '^#' /cloud9/apt-requirements.txt | xargs apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ + && apt autoclean -y \ + && apt autoremove -y \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir /workspace + +# Clone and install cloud9 +RUN git clone https://github.com/c9/core.git /cloud9/c9sdk +#RUN mkdir -p /cloud9/c9sdk/build /workspace/.ubuntu/.standalone +#RUN ln -sf /workspace/.ubuntu/.standalone /cloud9/c9sdk/build/standalone +RUN /cloud9/c9sdk/scripts/install-sdk.sh +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/ + + +################################################################################ +# builder +################################################################################ +FROM ubuntu:20.04 as builder + + +RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; + + +RUN apt-get update \ + && apt-get install -y --no-install-recommends curl ca-certificates gnupg patch + +# nodejs +RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \ + && apt-get install -y nodejs + +# yarn +RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install -y yarn + +# build frontend +COPY web /src/web +RUN cd /src/web \ + && yarn \ + && yarn build +RUN sed -i 's#app/locale/#novnc/app/locale/#' /src/web/dist/static/novnc/app/ui.js + + + +################################################################################ +# merge +################################################################################ +FROM system +LABEL maintainer="info@devindice.com" + +COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ + +RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \ + chmod +x /usr/local/lib/web/frontend/static/websockify/run + +EXPOSE 80 +EXPOSE 9999 + +WORKDIR /workspace +ENV HOME=/home/ubuntu \ + SHELL=/bin/bash +HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1:6079/api/health +ENTRYPOINT ["/startup.sh"] + +# Install Docker +RUN groupadd -g 281 docker +RUN mkdir -p /etc/apt/keyrings +RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg +RUN echo \ + "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 +RUN apt-get update +RUN apt-get -y install nautilus 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 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-merge.deb $(curl -s https://www.sublimemerge.com/download_thanks?target=x64-deb#direct-downloads | grep amd64.deb | grep url | awk -F'"' '{print $2}') +RUN wget -O chrome.deb wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb || true +RUN apt install -y ./beyond-compare.deb ./sublime-text.deb ./sublime-merge.deb ./chrome.deb + +RUN npm -g install sass yuglify + +RUN apt -y remove thunar + +# Copy files +COPY rootfs / +RUN rm -rf /workspace/* diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 deleted file mode 100644 index 8e8b0dd..0000000 --- a/Dockerfile.amd64 +++ /dev/null @@ -1,179 +0,0 @@ -# Built with arch: amd64 flavor: lxde image: ubuntu:20.04 -# -################################################################################ -# base system -################################################################################ - -FROM ubuntu:20.04 as system - -RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; - -# Ca-Certificates -RUN apt update \ - && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ - ca-certificates \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - - -# built-in packages -ENV DEBIAN_FRONTEND noninteractive -RUN apt update \ - && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends apt-utils software-properties-common curl \ - apache2-utils man-db manpages-posix manpages-dev manpages-posix-dev \ - && apt update \ - && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ - supervisor nginx sudo net-tools zenity xz-utils \ - dbus-x11 x11-utils alsa-utils \ - mesa-utils libgl1-mesa-dri \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -# install debs error if combine together -RUN apt update \ - && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ - xvfb x11vnc ttf-ubuntu-font-family ttf-wqy-zenhei \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -#RUN apt update \ -# && apt install -y gpg-agent \ -# && curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ -# && (dpkg -i ./google-chrome-stable_current_amd64.deb || apt-get install -fy) \ -# && curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add \ -# && rm google-chrome-stable_current_amd64.deb \ -# && rm -rf /var/lib/apt/lists/* - -# Install Desktop -RUN apt update \ - && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ - xubuntu-desktop gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -# tini service manager -ARG TINI_VERSION=v0.18.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /bin/tini -RUN chmod +x /bin/tini - -# ffmpeg -RUN apt update \ - && apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ - ffmpeg \ - && rm -rf /var/lib/apt/lists/* \ - && mkdir /usr/local/ffmpeg \ - && ln -s /usr/bin/ffmpeg /usr/local/ffmpeg/ffmpeg - -# python library -COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/ -RUN apt-get update \ - && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ - && apt-get install -y python3-pip python3-dev build-essential \ - && pip3 install setuptools wheel && pip3 install -r /tmp/requirements.txt \ - && ln -s /usr/bin/python3 /usr/local/bin/python \ - && dpkg-query -W -f='${Package}\n' > /tmp/b.txt \ - && apt-get remove -y `diff --changed-group-format='%>' --unchanged-group-format='' /tmp/a.txt /tmp/b.txt | xargs` \ - && apt-get autoclean -y \ - && apt-get autoremove -y \ - && rm -rf /var/lib/apt/lists/* \ - && rm -rf /var/cache/apt/* /tmp/a.txt /tmp/b.txt - -# Install Additonal Packages -RUN mkdir /cloud9 -COPY rootfs/cloud9/apt-requirements.txt /cloud9/apt-requirements.txt -RUN apt update \ - && grep -v '^#' /cloud9/apt-requirements.txt | xargs apt install -y -o Dpkg::Options::='--force-confold' --no-install-recommends --allow-unauthenticated \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -RUN mkdir /workspace - -# Clone and install cloud9 -RUN git clone https://github.com/c9/core.git /cloud9/c9sdk -#RUN mkdir -p /cloud9/c9sdk/build /workspace/.ubuntu/.standalone -#RUN ln -sf /workspace/.ubuntu/.standalone /cloud9/c9sdk/build/standalone -RUN /cloud9/c9sdk/scripts/install-sdk.sh -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/ - - -################################################################################ -# builder -################################################################################ -FROM ubuntu:20.04 as builder - - -RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; - - -RUN apt-get update \ - && apt-get install -y --no-install-recommends curl ca-certificates gnupg patch - -# nodejs -RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \ - && apt-get install -y nodejs - -# yarn -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -y yarn - -# build frontend -COPY web /src/web -RUN cd /src/web \ - && yarn \ - && yarn build -RUN sed -i 's#app/locale/#novnc/app/locale/#' /src/web/dist/static/novnc/app/ui.js - - - -################################################################################ -# merge -################################################################################ -FROM system -LABEL maintainer="info@devindice.com" - -COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ - -RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \ - chmod +x /usr/local/lib/web/frontend/static/websockify/run - -EXPOSE 80 -EXPOSE 9999 - -WORKDIR /workspace -ENV HOME=/home/ubuntu \ - SHELL=/bin/bash -HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1:6079/api/health -ENTRYPOINT ["/startup.sh"] - -# Install Docker -RUN groupadd -g 281 docker -RUN mkdir -p /etc/apt/keyrings -RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg -RUN echo \ - "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 -RUN apt-get update -RUN apt-get -y install nautilus 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 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-merge.deb $(curl -s https://www.sublimemerge.com/download_thanks?target=x64-deb#direct-downloads | grep amd64.deb | grep url | awk -F'"' '{print $2}') -RUN wget -O chrome.deb wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb || true -RUN apt install -y ./beyond-compare.deb ./sublime-text.deb ./sublime-merge.deb ./chrome.deb - -RUN npm -g install sass yuglify - -RUN apt -y remove thunar - -# Copy files -COPY rootfs / -RUN rm -rf /workspace/* diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 deleted file mode 100644 index 8c12efb..0000000 --- a/Dockerfile.arm64 +++ /dev/null @@ -1,129 +0,0 @@ -# Built with arch: arm64 flavor: lxde image: ubuntu:18.04 -# -################################################################################ -# base system -################################################################################ - -# qemu helper for arm build -FROM ubuntu:20.04 as amd64 -RUN apt update && apt install -y qemu-user-static -FROM arm64v8/ubuntu:20.04 as system -COPY --from=amd64 /usr/bin/qemu-aarch64-static /usr/bin/ - - - -RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; - - -# built-in packages -ENV DEBIAN_FRONTEND noninteractive -RUN apt update \ - && apt install -y --no-install-recommends software-properties-common curl apache2-utils \ - && apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - supervisor nginx sudo net-tools zenity xz-utils \ - dbus-x11 x11-utils alsa-utils \ - mesa-utils libgl1-mesa-dri \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* -# install debs error if combine together -RUN apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - xvfb x11vnc \ - vim-tiny firefox chromium-browser ttf-ubuntu-font-family ttf-wqy-zenhei \ - && add-apt-repository -r ppa:fcwu-tw/apps \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -RUN apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - lxde gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - - -# Additional packages require ~600MB -# libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw - -# tini for subreap -ARG TINI_VERSION=v0.18.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-arm64 /bin/tini -RUN chmod +x /bin/tini - -# ffmpeg -RUN apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - ffmpeg \ - && rm -rf /var/lib/apt/lists/* \ - && mkdir /usr/local/ffmpeg \ - && ln -s /usr/bin/ffmpeg /usr/local/ffmpeg/ffmpeg - -# python library -COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/ -RUN apt-get update \ - && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ - && apt-get install -y python3-pip python3-dev build-essential \ - && pip3 install setuptools wheel && pip3 install -r /tmp/requirements.txt \ - && ln -s /usr/bin/python3 /usr/local/bin/python \ - && dpkg-query -W -f='${Package}\n' > /tmp/b.txt \ - && apt-get remove -y `diff --changed-group-format='%>' --unchanged-group-format='' /tmp/a.txt /tmp/b.txt | xargs` \ - && apt-get autoclean -y \ - && apt-get autoremove -y \ - && rm -rf /var/lib/apt/lists/* \ - && rm -rf /var/cache/apt/* /tmp/a.txt /tmp/b.txt - - -################################################################################ -# builder -################################################################################ -FROM ubuntu:20.04 as builder - - -RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; - - -RUN apt-get update \ - && apt-get install -y --no-install-recommends curl ca-certificates gnupg patch - -# nodejs -RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \ - && apt-get install -y nodejs - -# yarn -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -y yarn - -# build frontend -COPY web /src/web -RUN cd /src/web \ - && yarn \ - && yarn build -RUN sed -i 's#app/locale/#novnc/app/locale/#' /src/web/dist/static/novnc/app/ui.js - - -RUN cd /src/web/dist/static/novnc && patch -p0 < /src/web/novnc-armhf-1.patch - - -################################################################################ -# merge -################################################################################ -FROM system -LABEL maintainer="fcwu.tw@gmail.com" - -COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ -COPY rootfs / -RUN ln -sf /usr/local/lib/web/frontend/static/websockify" "/usr/local/lib/web/frontend/static/novnc/utils/websockify && chmod +x /usr/local/lib/web/frontend/static/websockify/run -RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \ - chmod +x /usr/local/lib/web/frontend/static/websockify/run - -EXPOSE 80 -WORKDIR /root -ENV HOME=/home/ubuntu \ - SHELL=/bin/bash -HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1:6079/api/health -ENTRYPOINT ["/startup.sh"] diff --git a/Dockerfile.armhf b/Dockerfile.armhf deleted file mode 100644 index 561bb77..0000000 --- a/Dockerfile.armhf +++ /dev/null @@ -1,124 +0,0 @@ -# Built with arch: armhf flavor: lxde image: ubuntu:18.04 -# -################################################################################ -# base system -################################################################################ - -# qemu helper for arm build -FROM ubuntu:18.04 as amd64 -RUN apt update && apt install -y qemu-user-static -FROM arm32v7/ubuntu:18.04 as system -COPY --from=amd64 /usr/bin/qemu-arm-static /usr/bin/ - - - -RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; - - -# built-in packages -ENV DEBIAN_FRONTEND noninteractive -RUN apt update \ - && apt install -y --no-install-recommends software-properties-common curl apache2-utils \ - && apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - supervisor nginx sudo net-tools zenity xz-utils \ - dbus-x11 x11-utils alsa-utils \ - mesa-utils libgl1-mesa-dri \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* -# install debs error if combine together -RUN add-apt-repository -y ppa:fcwu-tw/apps \ - && apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - xvfb x11vnc=0.9.16-1 \ - vim-tiny firefox chromium-browser ttf-ubuntu-font-family ttf-wqy-zenhei \ - && add-apt-repository -r ppa:fcwu-tw/apps \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - -RUN apt update \ - && apt install -y --no-install-recommends --allow-unauthenticated \ - lxde gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \ - && apt autoclean -y \ - && apt autoremove -y \ - && rm -rf /var/lib/apt/lists/* - - -# Additional packages require ~600MB -# libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw - -# tini for subreap -ARG TINI_VERSION=v0.18.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-armhf /bin/tini -RUN chmod +x /bin/tini - -# ffmpeg -RUN mkdir -p /usr/local/ffmpeg \ - && curl -sSL https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz | tar xJvf - -C /usr/local/ffmpeg/ --strip 1 - -# python library -COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/ -RUN apt-get update \ - && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ - && apt-get install -y python-pip python-dev build-essential \ - && pip install setuptools wheel && pip install -r /tmp/requirements.txt \ - && dpkg-query -W -f='${Package}\n' > /tmp/b.txt \ - && apt-get remove -y `diff --changed-group-format='%>' --unchanged-group-format='' /tmp/a.txt /tmp/b.txt | xargs` \ - && apt-get autoclean -y \ - && apt-get autoremove -y \ - && rm -rf /var/lib/apt/lists/* \ - && rm -rf /var/cache/apt/* /tmp/a.txt /tmp/b.txt - - -################################################################################ -# builder -################################################################################ -FROM ubuntu:18.04 as builder - - -RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list; - - -RUN apt-get update \ - && apt-get install -y --no-install-recommends curl ca-certificates gnupg patch - -# nodejs -RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \ - && apt-get install -y nodejs - -# yarn -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install -y yarn - -# build frontend -COPY web /src/web -RUN cd /src/web \ - && yarn \ - && yarn run build -RUN sed -i 's#app/locale/#novnc/app/locale/#' /src/web/dist/static/novnc/app/ui.js - -RUN cd /src/web/dist/static/novnc && patch -p0 < /src/web/novnc-armhf-1.patch - - -################################################################################ -# merge -################################################################################ -FROM system -LABEL maintainer="fcwu.tw@gmail.com" - -COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ -COPY rootfs / -RUN ln -sf /usr/local/lib/web/frontend/static/websockify" "/usr/local/lib/web/frontend/static/novnc/utils/websockify && chmod +x /usr/local/lib/web/frontend/static/websockify/run -RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \ - chmod +x /usr/local/lib/web/frontend/static/websockify/run - -EXPOSE 80 -WORKDIR /root -ENV HOME=/home/ubuntu \ - SHELL=/bin/bash -HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1:6079/api/health -ENTRYPOINT ["/startup.sh"] From 5cb2cecef85ca09d74c68ec48e6850c06675e1bd Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Wed, 17 Aug 2022 02:27:44 +0000 Subject: [PATCH 14/17] Update Semaphore configuration --- .semaphore/pipeline_2.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.semaphore/pipeline_2.yml b/.semaphore/pipeline_2.yml index 21da1b0..80e578c 100644 --- a/.semaphore/pipeline_2.yml +++ b/.semaphore/pipeline_2.yml @@ -17,6 +17,7 @@ blocks: - '# Login to Dockerhub' - 'echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin' - '# Create a version' + - 'docker image tag devindice/cloud9-ide-vdi:latest devindice/cloud9-ide-vdi:testing' - 'docker push $DOCKER_USERNAME/cloud9-ide-vdi:testing' secrets: - name: Dockerhub From 84575ea4b22843d3c41da54e49dc882a8c3165d8 Mon Sep 17 00:00:00 2001 From: Kyle Hibbard Date: Wed, 17 Aug 2022 09:33:46 -0400 Subject: [PATCH 15/17] Testing Sleep in Startup --- rootfs/startup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rootfs/startup.sh b/rootfs/startup.sh index ff75e31..c0c4ba5 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -1,4 +1,7 @@ #!/bin/bash + +sleep 6000 + if [ -n "$VNC_PASSWORD" ]; then echo -n "$VNC_PASSWORD" > /.password1 x11vnc -storepasswd $(cat /.password1) /.password2 From 068856b85d567e70a864cf3f4b4accf209b575ae Mon Sep 17 00:00:00 2001 From: Kyle Hibbard Date: Wed, 17 Aug 2022 10:30:13 -0400 Subject: [PATCH 16/17] Moving Sleep for Testing --- rootfs/startup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rootfs/startup.sh b/rootfs/startup.sh index c0c4ba5..468a3e6 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -1,7 +1,5 @@ #!/bin/bash -sleep 6000 - if [ -n "$VNC_PASSWORD" ]; then echo -n "$VNC_PASSWORD" > /.password1 x11vnc -storepasswd $(cat /.password1) /.password2 @@ -137,4 +135,6 @@ grep "127.0.0.1 archive.linux.duke.edu" /etc/hosts || echo "127.0.0.1 archive.li chown -R $USER:$USER /home/$USER/ +sleep 6000 + exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf From 4188a13c9b6f8e5ba5f3fe9379116286b6ba55a8 Mon Sep 17 00:00:00 2001 From: Devin Dice Date: Wed, 17 Aug 2022 11:58:57 -0400 Subject: [PATCH 17/17] Adding directory --- rootfs/startup.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rootfs/startup.sh b/rootfs/startup.sh index 468a3e6..e40eade 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -119,6 +119,7 @@ fi bash /cloud9/configure_desktop.sh & +mkdir -p /home/$USER/Workspace/-Shared\ Files- grep -qxF "/home/$USER/Workspace /workspace none defaults,bind 0 0" /etc/fstab || echo "/home/$USER/Workspace /workspace none defaults,bind 0 0" >> /etc/fstab mount -a @@ -128,13 +129,11 @@ mkdir -p /home/$USER/.config/gtk-3.0 # Keep these bookmarks grep "file:///home/$USER/Documents" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Documents" >> /home/$USER/.config/gtk-3.0/bookmarks grep "file:///home/$USER/Workspace" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Workspace" >> /home/$USER/.config/gtk-3.0/bookmarks -grep "file:///home/$USER/Workspace/Shared%20Files" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Workspace/Shared%20Files" >> /home/$USER/.config/gtk-3.0/bookmarks +grep "file:///home/$USER/Workspace/Shared%20Files" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Workspace/-Shared%20Files-" >> /home/$USER/.config/gtk-3.0/bookmarks grep "file:///home/$USER/Downloads" /home/$USER/.config/gtk-3.0/bookmarks || echo "file:///home/$USER/Downloads" >> /home/$USER/.config/gtk-3.0/bookmarks grep "127.0.0.1 archive.linux.duke.edu" /etc/hosts || echo "127.0.0.1 archive.linux.duke.edu" >> /etc/hosts chown -R $USER:$USER /home/$USER/ -sleep 6000 - exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf