From d8e93327a05670460e55b352b346c8c19eb4d251 Mon Sep 17 00:00:00 2001 From: Marc Paquette Date: Fri, 21 May 2021 15:19:02 -0400 Subject: [PATCH] Modify tmux settings to allow tmux attach to be default connection --- bin/capi-workspaces | 2 +- capi-workspace-docker/Dockerfile | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/capi-workspaces b/bin/capi-workspaces index fddee70..9cbafe3 100755 --- a/bin/capi-workspaces +++ b/bin/capi-workspaces @@ -19,4 +19,4 @@ fi echo "Running 'kubectl exec --stdin --tty $pod -- /bin/bash'" echo "" echo "" -kubectl exec --stdin --tty "$pod" -- /bin/bash +kubectl exec --stdin --tty "$pod" -- tmux attach diff --git a/capi-workspace-docker/Dockerfile b/capi-workspace-docker/Dockerfile index 393ceab..7c2bc1d 100644 --- a/capi-workspace-docker/Dockerfile +++ b/capi-workspace-docker/Dockerfile @@ -85,4 +85,7 @@ RUN set -ex && \ RUN cd ~/workspace/capi-release/src/cloud_controller_ng && \ bundle install +# Allow tmux to create a tmux session when attaching +RUN echo 'new-session -n $HOST' > ~/.tmux.conf + CMD sleep infinity