diff --git a/stx/dockerfiles/stx-builder.Dockerfile b/stx/dockerfiles/stx-builder.Dockerfile index e6903e0b..21e074a4 100644 --- a/stx/dockerfiles/stx-builder.Dockerfile +++ b/stx/dockerfiles/stx-builder.Dockerfile @@ -51,6 +51,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ rpm2cpio \ ssh \ sudo \ + tini \ unzip \ vim \ wget \ @@ -97,3 +98,6 @@ RUN apt-key add /root/pubkey.rsa && rm -f /root/pubkey.rsa RUN mkdir -p /etc/vim COPY stx/toCOPY/common/vimrc.local /etc/vim/vimrc.local RUN chmod 0644 /etc/vim/vimrc.local + +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/bin/bash", "-i", "-c", "exec /bin/sleep infinity" ] diff --git a/stx/lib/stx/k8s.py b/stx/lib/stx/k8s.py index 7cb6ce25..a3e3b215 100644 --- a/stx/lib/stx/k8s.py +++ b/stx/lib/stx/k8s.py @@ -80,7 +80,7 @@ class KubeHelper: suffix='.stderr') as stderr_file: cmd = f'{self.config.kubectl()} get pods --no-headers' cmd += f' --selector=app.kubernetes.io/instance={project_name} 2>{stderr_file.name}' - process_result = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE) + process_result = subprocess.run(cmd, encoding='utf-8', shell=True, stdout=subprocess.PIPE) if process_result.returncode != 0: logger.error('Command failed: %s\n%s', cmd, stderr_file.fread()) raise RuntimeError("Failed to list pods") diff --git a/stx/lib/stx/stx_control.py b/stx/lib/stx/stx_control.py index f3c30e33..36325f2b 100644 --- a/stx/lib/stx/stx_control.py +++ b/stx/lib/stx/stx_control.py @@ -306,7 +306,7 @@ stx-pkgbuilder/configmap/') self.logger.warning("gave up while pods are still running") break self.logger.info("waiting for %d pod(s) to exit", pod_count) - time.sleep(3) + time.sleep(2) def handleIsStartedTask(self, projectname): if self.k8s.helm_release_exists(projectname): diff --git a/stx/toCOPY/aptly/entrypoint.sh b/stx/toCOPY/aptly/entrypoint.sh index 321af57f..3af011d3 100755 --- a/stx/toCOPY/aptly/entrypoint.sh +++ b/stx/toCOPY/aptly/entrypoint.sh @@ -39,4 +39,4 @@ else fi # Start Supervisor -/usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf