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