From 524f9863fdd16768829d8177b0237d7215f97d61 Mon Sep 17 00:00:00 2001 From: thelamer Date: Mon, 15 Apr 2024 10:48:11 -0700 Subject: [PATCH 1/2] add proot-apps ubuntujammy --- Dockerfile | 7 +++++++ Dockerfile.aarch64 | 7 +++++++ .../s6-overlay/s6-rc.d/init-kasmvnc-config/run | 15 +++++++++++++++ root/kasminit | 8 ++++++++ 4 files changed, 37 insertions(+) diff --git a/Dockerfile b/Dockerfile index 25a4fc4..1f9f359 100644 --- a/Dockerfile +++ b/Dockerfile @@ -366,6 +366,13 @@ RUN \ echo "abc:abc" | chpasswd && \ usermod -s /bin/bash abc && \ usermod -aG sudo abc && \ + echo "**** proot-apps ****" && \ + mkdir /proot-apps/ && \ + PAPPS_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/proot-apps/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]') && \ + curl -L https://github.com/linuxserver/proot-apps/releases/download/${PAPPS_RELEASE}/proot-apps-x86_64.tar.gz \ + | tar -xzf - -C /proot-apps/ && \ + echo "${PAPPS_RELEASE}" > /proot-apps/version && \ echo "**** kasm support ****" && \ useradd \ -u 1000 -U \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 44fa946..8df5223 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -368,6 +368,13 @@ RUN \ echo "abc:abc" | chpasswd && \ usermod -s /bin/bash abc && \ usermod -aG sudo abc && \ + echo "**** proot-apps ****" && \ + mkdir /proot-apps/ && \ + PAPPS_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/proot-apps/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]') && \ + curl -L https://github.com/linuxserver/proot-apps/releases/download/${PAPPS_RELEASE}/proot-apps-aarch64.tar.gz \ + | tar -xzf - -C /proot-apps/ && \ + echo "${PAPPS_RELEASE}" > /proot-apps/pversion && \ echo "**** kasm support ****" && \ useradd \ -u 1000 -U \ diff --git a/root/etc/s6-overlay/s6-rc.d/init-kasmvnc-config/run b/root/etc/s6-overlay/s6-rc.d/init-kasmvnc-config/run index e71ec9b..db7590d 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-kasmvnc-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-kasmvnc-config/run @@ -45,3 +45,18 @@ if [[ ! -z ${NO_FULL+x} ]] && [[ ! -f /fulllock ]]; then /etc/xdg/openbox/rc.xml touch /fulllock fi + +# Add proot-apps +if [ ! -f "${HOME}/.local/bin/proot-apps" ]; then + mkdir -p ${HOME}/.local/bin/ + cp /proot-apps/* ${HOME}/.local/bin/ + echo 'export PATH="$HOME/.local/bin:$PATH"' >> $HOME/.bashrc + chown abc:abc \ + ${HOME}/.bashrc \ + ${HOME}/.local/ \ + ${HOME}/.local/bin \ + ${HOME}/.local/bin/{ncat,proot-apps,proot,jq,pversion} +elif ! diff -q /proot-apps/pversion ${HOME}/.local/bin/pversion > /dev/null; then + cp /proot-apps/* ${HOME}/.local/bin/ + chown abc:abc ${HOME}/.local/bin/{ncat,proot-apps,proot,jq,pversion} +fi diff --git a/root/kasminit b/root/kasminit index 65e1cd7..ea8c4b2 100755 --- a/root/kasminit +++ b/root/kasminit @@ -65,6 +65,14 @@ cp \ /defaults/startwm.sh \ $HOME/.vnc/xstartup touch $HOME/.vnc/.de-was-selected +# Add proot-apps +if [ ! -f "${HOME}/.local/bin/proot-apps" ]; then + mkdir -p ${HOME}/.local/bin/ + cp /proot-apps/* ${HOME}/.local/bin/ + echo 'export PATH="$HOME/.local/bin:$PATH"' >> $HOME/.bashrc +elif ! diff -q /proot-apps/pversion ${HOME}/.local/bin/pversion > /dev/null; then + cp /proot-apps/* ${HOME}/.local/bin/ +fi ## KasmVNC init ## # Password From b8f83ff6f5ec0cf3639e5cfff47ae4c3d6ea462a Mon Sep 17 00:00:00 2001 From: thelamer Date: Mon, 15 Apr 2024 11:42:06 -0700 Subject: [PATCH 2/2] typo --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1f9f359..282777c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -372,7 +372,7 @@ RUN \ | awk '/tag_name/{print $4;exit}' FS='[""]') && \ curl -L https://github.com/linuxserver/proot-apps/releases/download/${PAPPS_RELEASE}/proot-apps-x86_64.tar.gz \ | tar -xzf - -C /proot-apps/ && \ - echo "${PAPPS_RELEASE}" > /proot-apps/version && \ + echo "${PAPPS_RELEASE}" > /proot-apps/pversion && \ echo "**** kasm support ****" && \ useradd \ -u 1000 -U \