From e0fd26a0790434e60783f201c355ee2e1ac7b70d Mon Sep 17 00:00:00 2001 From: Jan Kuri Date: Fri, 10 Nov 2017 21:12:15 +0100 Subject: [PATCH] fix(output): fix terminal output issues --- src/api/docker.ts | 3 ++- src/app/components/app-images/app-images.component.ts | 1 + src/app/components/app-job/app-job.component.ts | 1 + src/files/docker-essential/entry.sh | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api/docker.ts b/src/api/docker.ts index 8b6697e36..988488b0d 100644 --- a/src/api/docker.ts +++ b/src/api/docker.ts @@ -110,7 +110,8 @@ export function attachExec(id: string, cmd: any): Observable { } else if (str.includes('[success]')) { exitCode = 0; ws.end(); - } else if (!str.includes('/usr/bin/abstruse') && !str.startsWith('>')) { + } else if (!str.includes('/usr/bin/abstruse') && !str.startsWith('>') && + !str.startsWith('abstruse@')) { if (str.includes('//') && str.includes('@')) { str = str.replace(/\/\/(.*)@/, '//'); } diff --git a/src/app/components/app-images/app-images.component.ts b/src/app/components/app-images/app-images.component.ts index 81d468c79..4c650a172 100644 --- a/src/app/components/app-images/app-images.component.ts +++ b/src/app/components/app-images/app-images.component.ts @@ -182,6 +182,7 @@ export class AppImagesComponent implements OnInit, OnDestroy { 'RUN cd /home/abstruse && sudo chown -Rv 1000:100 /home/abstruse', '', 'RUN sudo chmod +x /entry.sh /etc/init.d/* /usr/bin/abstruse*', + 'ENTRYPOINT ["/bin/bash"]', 'CMD ["/entry.sh"]', '', 'EXPOSE 22 5900', diff --git a/src/app/components/app-job/app-job.component.ts b/src/app/components/app-job/app-job.component.ts index 72d47825d..23b8103e0 100644 --- a/src/app/components/app-job/app-job.component.ts +++ b/src/app/components/app-job/app-job.component.ts @@ -77,6 +77,7 @@ export class AppJobComponent implements OnInit, OnDestroy { this.processing = false; } else if (event.type === 'job restarted' && event.data === this.id) { this.processing = false; + this.terminalInput = { clear: true }; } else if (event.type === 'exposed ports') { const portData = event.data && event.data.info || null; diff --git a/src/files/docker-essential/entry.sh b/src/files/docker-essential/entry.sh index 9397f721a..1bd0aa972 100755 --- a/src/files/docker-essential/entry.sh +++ b/src/files/docker-essential/entry.sh @@ -3,7 +3,7 @@ VNC_STORE_PWD_FILE=/home/abstruse/.vnc/passwd if [ ! -e "${VNC_STORE_PWD_FILE}" -o -n "${VNC_PASSWORD}" ]; then mkdir -vp /home/abstruse/.vnc - x11vnc -storepasswd ${VNC_PASSWORD:-abstruse} ${VNC_STORE_PWD_FILE} + x11vnc -storepasswd ${VNC_PASSWORD:-abstruse} ${VNC_STORE_PWD_FILE} &> /dev/null fi export CHROME=${CHROME:-/opt/google/chrome/google-chrome}