From cd685c7df8eb7748f0a62d3666ad911aff1b4860 Mon Sep 17 00:00:00 2001 From: Pawel Zayakin Date: Sun, 21 Jul 2024 01:00:48 +0000 Subject: [PATCH] geany fix --- Docker-BioInf.sh | 22 ++++++++++++++-------- Dockerfile | 5 +++-- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Docker-BioInf.sh b/Docker-BioInf.sh index 2063389..49c8cbe 100644 --- a/Docker-BioInf.sh +++ b/Docker-BioInf.sh @@ -100,16 +100,20 @@ fi exit # Not start later code automatically #run command for users - awk -F"\t" '!/^#/ {print $NF}' users.tsv | xargs -l1 bash -c - awk -F"\t" '!/^#/ {print $NF}' staff.tsv | xargs -l1 bash -c + cat staff.tsv users.tsv | awk -F"\t" '!/^#/ {print $NF}' | xargs -l1 bash -c # lazy unmount - awk -F"\t" '!/^#/ {print $NF}' staff.tsv | sed 's/fusermount -u/fusermount -zu/g' | xargs -l1 bash -c + cat staff.tsv users.tsv | awk -F"\t" '!/^#/ {print $NF}' | sed 's/fusermount -u/fusermount -zu/g' | xargs -l1 bash -c # unmount all - awk -F"\t" '!/^#/ {print $NF}' staff.tsv | sed 's/;.*/"/g' | xargs -l1 bash -c - # reload NGINX in staff's dockers (to update Letsencrypt certificate) - awk '!/^#/ {print $2}' staff.tsv | xargs -i docker exec {} /usr/bin/supervisorctl -c /etc/supervisor/conf.d/supervisord.conf restart 6_nginx + cat staff.tsv users.tsv | awk -F"\t" '!/^#/ {print $NF}' | sed 's/;.*/"/g' | xargs -l1 bash -c # update staff's dockers - awk '!/^#/ {print $2}' staff.tsv | xargs -i docker exec {} /usr/bin/supervisorctl -c /etc/supervisor/conf.d/supervisord.conf start 7_update + cat staff.tsv users.tsv | awk '!/^#/ {print $2}' | xargs -i docker exec {} /usr/bin/supervisorctl -c /etc/supervisor/conf.d/supervisord.conf start 7_update + cat staff.tsv users.tsv | awk '!/^#/ {print $2}' | xargs -i docker exec {} env DEBIAN_FRONTEND=noninteractive /etc/supervisor/conf.d/update.sh 2>&1 | grep -E "/home/|upgraded|dpkg|amd64" + cat staff.tsv users.tsv | awk '!/^#/ {print $2}' | xargs -i docker exec {} env DEBIAN_FRONTEND=noninteractive dpkg --configure --force-confold -a + cat staff.tsv users.tsv | awk '!/^#/ {print $2}' | xargs -i docker exec {} env DEBIAN_FRONTEND=noninteractive apt --fix-broken install -y + cat staff.tsv users.tsv | awk '!/^#/ {print $2}' | xargs -i docker exec {} env DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y jupyter-notebook + # reload NGINX in staff's dockers (to update Letsencrypt certificate) + cat staff.tsv users.tsv | awk '!/^#/ {print $2}' | xargs -i docker exec {} /usr/bin/supervisorctl -c /etc/supervisor/conf.d/supervisord.conf restart 6_nginx + cat staff.tsv users.tsv | awk '!/^#/ {print $2}' | xargs -i docker exec {} /usr/bin/supervisorctl -c /etc/supervisor/conf.d/supervisord.conf restart 5_sshd # Check the mounted folders for staff mount | awk -F '/' '/\/home/ {print $4}' > mounted.lst && awk '!/^#/ {print $2}' staff.tsv > staff.lst && grep -vxf mounted.lst staff.lst > mount.lst awk -F"\t" '!/^#/ {print $NF}' staff.tsv | grep -f mount.lst | xargs -l1 bash -c @@ -137,12 +141,14 @@ fi nuser="user300" echo $nuser docker top $nuser + docker logs $nuser docker restart $nuser awk -F"\t" "/\t$nuser\t/ {print \$NF}" staff.tsv | xargs -l1 bash -c docker exec $nuser /usr/bin/supervisorctl -c /etc/supervisor/conf.d/supervisord.conf restart 5_sshd docker exec $nuser /usr/bin/supervisorctl -c /etc/supervisor/conf.d/supervisord.conf restart 6_nginx docker exec $nuser /etc/supervisor/conf.d/update.sh - docker exec $nuser apt --fix-broken install -y + docker exec -it $nuser bash + docker exec $nuser env DEBIAN_FRONTEND=noninteractive apt --fix-broken install -y awk -F"\t" "/\t$nuser\t/ {print}" staff.tsv | tr '\t' ' ' | sudo xargs -l -P 10 ./Docker-BioInf-per-student.sh docker stop $nuser docker rm $nuser diff --git a/Dockerfile b/Dockerfile index f923832..2ace7b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ FROM debian:testing +# docker run -it -rm --name test debian:testing bash RUN sed -i 's/main$/main contrib non-free non-free-firmware/' /etc/apt/sources.list.d/debian.sources && \ env DEBIAN_FRONTEND=noninteractive apt-get update --allow-releaseinfo-change && \ env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends apt-utils whiptail && \ @@ -7,7 +8,7 @@ RUN sed -i 's/main$/main contrib non-free non-free-firmware/' /etc/apt/sources.l env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ locales sudo mc curl wget procps psmisc htop nginx-light libnginx-mod-http-auth-pam usrmerge \ shellinabox ssh mosh tmux supervisor bash-completion gpm bzip2 \ - at-spi2-core policykit-1-gnome dbus-x11 firefox-esr gpicview zathura geany meld fonts-firacode \ + at-spi2-core policykit-1-gnome dbus-x11 firefox-esr gpicview zathura meld fonts-firacode \ build-essential gfortran libgfortran-13-dev liblapack-dev libblas-dev libopenblas-dev \ libxml2-dev libjpeg-dev libcurl4-openssl-dev libssl-dev zlib1g-dev \ lxde-core lxlauncher lxterminal lxmenu-data lxtask synaptic xarchiver \ @@ -18,7 +19,7 @@ RUN sed -i 's/main$/main contrib non-free non-free-firmware/' /etc/apt/sources.l sortmerna bcftools gnumeric bedtools gffread igv && \ apt-get autoremove -y && \ apt-get autoclean -y -# GTK 2 and 3 settings for icons and style, wallpaper # tophat fastx-toolkit +# GTK 2 and 3 settings for icons and style, wallpaper # apt-get install -y --no-install-recommends tophat fastx-toolkit geany RUN echo 'gtk-theme-name="Raleigh"\ngtk-icon-theme-name="nuoveXT2"\n' > /etc/skel/.gtkrc-2.0 && \ mkdir -p /etc/skel/.config/gtk-3.0 && \ echo '[Settings]\ngtk-theme-name="Raleigh"\ngtk-icon-theme-name="nuoveXT2"\n' > /etc/skel/.config/gtk-3.0/settings.ini && \