From 4288201520dde6d8a225951e760bff3f869ce739 Mon Sep 17 00:00:00 2001 From: Menny Even Danan Date: Mon, 4 Aug 2025 15:01:07 +0000 Subject: [PATCH 1/4] bump version --- .github/versions.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/versions.env b/.github/versions.env index 8447c76..677acf6 100755 --- a/.github/versions.env +++ b/.github/versions.env @@ -1,3 +1,3 @@ -IMAGE_VERSION=1.21.9 +IMAGE_VERSION=1.21.10 NDK_VERSION=27.2.12479018 BAZELISK_VERSION=v1.26.0 From b84f2b25464195ceee281e369e8fb5c9f174dbbb Mon Sep 17 00:00:00 2001 From: Menny Even Danan Date: Mon, 4 Aug 2025 00:18:38 +0000 Subject: [PATCH 2/4] feat: Add and configure tmux Adds a default tmux configuration to the android_dev image. This provides a better out-of-the-box experience with settings for: - Mouse support - Increased history limit - More intuitive keybindings for panes and windows - A command to easily reload the configuration --- android_dev/Dockerfile | 1 + android_dev/tmux.conf | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 android_dev/tmux.conf diff --git a/android_dev/Dockerfile b/android_dev/Dockerfile index a8a84fc..7eb4302 100644 --- a/android_dev/Dockerfile +++ b/android_dev/Dockerfile @@ -73,6 +73,7 @@ RUN echo "export NVM_DIR=${NVM_DIR}" >> /home/${ACTUAL_USER}/.zshrc && \ # Switch back to root for remaining setup USER root +COPY tmux.conf /etc/tmux.conf COPY entrypoint.sh /opt/workspace/entrypoint.sh RUN chmod +x /opt/workspace/entrypoint.sh diff --git a/android_dev/tmux.conf b/android_dev/tmux.conf new file mode 100644 index 0000000..5077c3f --- /dev/null +++ b/android_dev/tmux.conf @@ -0,0 +1,35 @@ +# Set the prefix to Ctrl+b +set-option -g prefix C-b +bind-key C-b send-prefix + +# Enable mouse mode (tmux 2.1 and above) +set -g mouse on + +# Set a longer history limit +set -g history-limit 10000 + +# Start windows and panes at 1, not 0 +set -g base-index 1 +setw -g pane-base-index 1 + +# Renumber windows when a window is closed +set-option -g renumber-windows on + +# Use Alt-arrow keys to switch panes +bind -n M-Left select-pane -L +bind -n M-Right select-pane -R +bind -n M-Up select-pane -U +bind -n M-Down select-pane -D + +# Shift-arrow to switch windows +bind -n S-Left previous-window +bind -n S-Right next-window + +# Easy-to-remember split pane commands +bind | split-window -h +bind - split-window -v +unbind '"' +unbind % + +# Reload config file +bind r source-file /etc/tmux.conf \; display "Reloaded!" \ No newline at end of file From 52cc61659af0a5f575fc5585497af3d6c1c8704a Mon Sep 17 00:00:00 2001 From: Menny Even Danan Date: Mon, 4 Aug 2025 14:57:01 +0000 Subject: [PATCH 3/4] tmux session name to include the branch and repo --- android_dev/Dockerfile | 3 +-- android_dev/entrypoint.sh | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/android_dev/Dockerfile b/android_dev/Dockerfile index 7eb4302..3372d1c 100644 --- a/android_dev/Dockerfile +++ b/android_dev/Dockerfile @@ -67,8 +67,7 @@ RUN RUNZSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmy RUN echo "export NVM_DIR=${NVM_DIR}" >> /home/${ACTUAL_USER}/.zshrc && \ echo "export PNPM_HOME=${PNPM_HOME}" >> /home/${ACTUAL_USER}/.zshrc && \ echo "export PATH=${PATH}" >> /home/${ACTUAL_USER}/.zshrc && \ - echo "source ${NVM_DIR}/nvm.sh" >> /home/${ACTUAL_USER}/.zshrc && \ - echo "tmux attach-session -t dev-session 2>/dev/null || tmux new-session -s dev-session" >> /home/${ACTUAL_USER}/.zshrc + echo "source ${NVM_DIR}/nvm.sh" >> /home/${ACTUAL_USER}/.zshrc # Switch back to root for remaining setup USER root diff --git a/android_dev/entrypoint.sh b/android_dev/entrypoint.sh index c8d8ea9..bc3ebe5 100755 --- a/android_dev/entrypoint.sh +++ b/android_dev/entrypoint.sh @@ -17,6 +17,10 @@ WORKSPACE_DIR="/opt/workspace" REPO_NAME=$(basename "${GIT_REPO}") CLONE_DIR="${WORKSPACE_DIR}/${REPO_NAME}" +# Define the tmux session name +TMUX_SESSION_NAME="${GIT_BRANCH}-${REPO_NAME}" +export TMUX_SESSION_NAME + # --- 1. Clone Git Repository --- echo "Cloning repository '${GIT_REPO}' from branch '${GIT_BRANCH}'..." @@ -24,6 +28,7 @@ echo "Cloning repository '${GIT_REPO}' from branch '${GIT_BRANCH}'..." git clone --branch "${GIT_BRANCH}" "https://${GIT_PROVIDER}/${GIT_REPO}" "${CLONE_DIR}" # The user should be in the clone folder right after login echo "cd $CLONE_DIR" >> "/home/${ACTUAL_USER}/.zshrc" +echo "tmux attach-session -t \"${TMUX_SESSION_NAME}\" 2>/dev/null || tmux new-session -s \"${TMUX_SESSION_NAME}\"" >> "/home/${ACTUAL_USER}/.zshrc" # --- 2. Set Permissions --- From 2a39a69c046306f81682ba1bf9802c2572d6bc06 Mon Sep 17 00:00:00 2001 From: Menny Even Danan Date: Mon, 4 Aug 2025 15:03:49 +0000 Subject: [PATCH 4/4] Use ssh to clone --- android_dev/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android_dev/entrypoint.sh b/android_dev/entrypoint.sh index bc3ebe5..34f85a5 100755 --- a/android_dev/entrypoint.sh +++ b/android_dev/entrypoint.sh @@ -25,7 +25,7 @@ export TMUX_SESSION_NAME echo "Cloning repository '${GIT_REPO}' from branch '${GIT_BRANCH}'..." # Clone the repository into a specific subdirectory within the workspace -git clone --branch "${GIT_BRANCH}" "https://${GIT_PROVIDER}/${GIT_REPO}" "${CLONE_DIR}" +git clone --branch "${GIT_BRANCH}" "git@${GIT_PROVIDER}:${GIT_REPO}.git" "${CLONE_DIR}" # The user should be in the clone folder right after login echo "cd $CLONE_DIR" >> "/home/${ACTUAL_USER}/.zshrc" echo "tmux attach-session -t \"${TMUX_SESSION_NAME}\" 2>/dev/null || tmux new-session -s \"${TMUX_SESSION_NAME}\"" >> "/home/${ACTUAL_USER}/.zshrc"