From b9e7c79c07ed044bd6e39dc9e861973325248877 Mon Sep 17 00:00:00 2001 From: ReachableCEO Date: Tue, 28 Oct 2025 20:07:29 -0500 Subject: [PATCH] rolling snapshot push --- .../SupportStack/tests/test_mvp_stack.sh | 7 +++-- .../ToolboxStack/toolbox-base/Dockerfile | 19 ++++++++++++-- artifacts/ToolboxStack/toolbox-base/PROMPT | 26 +++++++++++++++++++ .../ToolboxStack/toolbox-base/docs/TOOLS.md | 20 ++++++++++++++ 4 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 artifacts/ToolboxStack/toolbox-base/PROMPT create mode 100644 artifacts/ToolboxStack/toolbox-base/docs/TOOLS.md diff --git a/artifacts/SupportStack/tests/test_mvp_stack.sh b/artifacts/SupportStack/tests/test_mvp_stack.sh index 6ba147e..df6df3c 100755 --- a/artifacts/SupportStack/tests/test_mvp_stack.sh +++ b/artifacts/SupportStack/tests/test_mvp_stack.sh @@ -7,8 +7,7 @@ set -e # Load environment settings SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -CONFIG_DIR="${SCRIPT_DIR}/config" -ENV_FILE="${CONFIG_DIR}/TSYSDevStack-SupportStack-Demo-Settings" +ENV_FILE="${SCRIPT_DIR}/TSYSDevStack-SupportStack-Demo-Settings" if [ ! -f "$ENV_FILE" ]; then echo "Error: Environment settings file not found at $ENV_FILE" @@ -22,7 +21,7 @@ echo "=====================================" # Test 1: Verify all containers are running echo "Test 1: Checking if all containers are running..." -containers=(tsysdevstack-docker-socket-proxy tsysdevstack-homepage tsysdevstack-wakaapi) +containers=($DOCKER_SOCKET_PROXY_NAME $HOMEPAGE_NAME $WAKAAPI_NAME) all_running=true for container in "${containers[@]}"; do @@ -67,7 +66,7 @@ echo "" echo "Test 3: Checking service configurations..." # Check if Docker socket proxy is running and accessible by other services -if docker exec tsysdevstack-docker-socket-proxy sh -c "nc -z localhost 2375 && echo 'ok'" > /dev/null 2>&1; then +if docker exec $DOCKER_SOCKET_PROXY_NAME sh -c "nc -z localhost 2375 && echo 'ok'" > /dev/null 2>&1; then echo "โœ“ Docker socket proxy is running internally" else echo "โš  Docker socket proxy internal connection check skipped (not required to pass)" diff --git a/artifacts/ToolboxStack/toolbox-base/Dockerfile b/artifacts/ToolboxStack/toolbox-base/Dockerfile index 450d84f..f38efc0 100644 --- a/artifacts/ToolboxStack/toolbox-base/Dockerfile +++ b/artifacts/ToolboxStack/toolbox-base/Dockerfile @@ -18,8 +18,16 @@ RUN apt-get update \ openssh-client \ ripgrep \ tmux \ + screen \ fd-find \ bat \ + build-essential \ + pkg-config \ + libssl-dev \ + zlib1g-dev \ + libffi-dev \ + libsqlite3-dev \ + libreadline-dev \ wget \ zsh \ && apt-get clean \ @@ -42,6 +50,9 @@ RUN curl -fsSL https://starship.rs/install.sh | sh -s -- -y -b /usr/local/bin RUN curl -sSfL https://raw.githubusercontent.com/aquaproj/aqua-installer/v2.3.1/aqua-installer | AQUA_ROOT_DIR=/usr/local/share/aquaproj-aqua bash \ && ln -sf /usr/local/share/aquaproj-aqua/bin/aqua /usr/local/bin/aqua +# Install mise for runtime management (no global toolchains pre-installed) +RUN curl -sSfL https://mise.jdx.dev/install.sh | env MISE_INSTALL_PATH=/usr/local/bin/mise MISE_INSTALL_HELP=0 sh + # Create non-root user with matching UID/GID for host mapping RUN if getent passwd "${USER_ID}" >/dev/null; then \ existing_user="$(getent passwd "${USER_ID}" | cut -d: -f1)"; \ @@ -58,7 +69,11 @@ RUN su - "${USERNAME}" -c 'git clone --depth=1 https://github.com/ohmyzsh/ohmyzs && su - "${USERNAME}" -c 'mkdir -p ~/.config' \ && su - "${USERNAME}" -c 'sed -i "s/^plugins=(git)$/plugins=(git fzf)/" ~/.zshrc' \ && su - "${USERNAME}" -c 'printf "\nexport PATH=\"\$HOME/.local/share/aquaproj-aqua/bin:\$HOME/.local/bin:\$PATH\"\n" >> ~/.zshrc' \ - && su - "${USERNAME}" -c 'printf "\n# Starship prompt\neval \"\$(starship init zsh)\"\n" >> ~/.zshrc' + && su - "${USERNAME}" -c 'printf "\n# Starship prompt\neval \"\$(starship init zsh)\"\n" >> ~/.zshrc' \ + && su - "${USERNAME}" -c 'printf "\n# mise runtime manager\neval \"\$(mise activate zsh)\"\n" >> ~/.zshrc' \ + && su - "${USERNAME}" -c 'printf "\n# mise runtime manager (bash)\neval \"\$(mise activate bash)\"\n" >> ~/.bashrc' \ + && su - "${USERNAME}" -c 'mkdir -p ~/.config/fish' \ + && su - "${USERNAME}" -c 'printf "\n# Shell prompt and runtime manager\nstarship init fish | source\nmise activate fish | source\n" >> ~/.config/fish/config.fish' COPY aqua.yaml /tmp/aqua.yaml @@ -72,7 +87,7 @@ RUN mkdir -p /workspace \ && chown "${USER_ID}:${GROUP_ID}" /workspace ENV SHELL=/usr/bin/zsh \ - PATH=/home/${USERNAME}/.local/share/aquaproj-aqua/bin:/home/${USERNAME}/.local/bin:${PATH} + PATH=/home/${USERNAME}/.local/share/aquaproj-aqua/bin:/home/${USERNAME}/.local/share/mise/shims:/home/${USERNAME}/.local/bin:${PATH} WORKDIR /workspace USER ${USERNAME} diff --git a/artifacts/ToolboxStack/toolbox-base/PROMPT b/artifacts/ToolboxStack/toolbox-base/PROMPT new file mode 100644 index 0000000..cbeac36 --- /dev/null +++ b/artifacts/ToolboxStack/toolbox-base/PROMPT @@ -0,0 +1,26 @@ +You are Codex, collaborating with a human on the TSYSDevStack ToolboxStack project. + +Context snapshot (toolbox-base): +- Working directory: artifacts/ToolboxStack/toolbox-base +- Image: tsysdevstack-toolboxstack-toolbox-base (Ubuntu 24.04) +- Container user: toolbox (non-root, UID/GID mapped to host) +- Mounted workspace: current repo at /workspace (rw) + +Current state: + - Dockerfile installs shell tooling (zsh/bash/fish with Starship & oh-my-zsh), core CLI utilities (curl, wget, git, tmux, screen, etc.), build-essential + headers, aqua, and mise. +- aqua manages CLIs (gh, tea, lazygit) via docs/TOOLS.md inventory. +- mise handles language/tool runtimes; activation wired into zsh, bash, and fish. +- docker-compose.yml runs container with host UID/GID, `sleep infinity`, and docker socket mount; run via run.sh/build.sh. +- Devcontainer config ( .devcontainer/devcontainer.json ) references the compose service. +- Documentation: docs/TOOLS.md tracks tooling inventory and must stay current. + +Collaboration guidelines: +1. Default to non-destructive operations; respect existing scripts run.sh/build.sh. +2. Any tooling changes require updating docs/TOOLS.md (inventory) and this prompt summary. +3. Keep configurations reproducible: prefer aqua/mise for new CLI/runtimes over apt unless prerequisites. +4. Mention verification steps (build/test) after changes. +5. Maintain UID/GID mapping and non-root execution. + +Active focus: +- Extend toolbox-base as a "daily driver" dev container while preserving reproducibility and documentation. +- Next contributor should review docs/TOOLS.md before modifying tooling and ensure both docs and this prompt reflect new state. diff --git a/artifacts/ToolboxStack/toolbox-base/docs/TOOLS.md b/artifacts/ToolboxStack/toolbox-base/docs/TOOLS.md new file mode 100644 index 0000000..1dcd9b3 --- /dev/null +++ b/artifacts/ToolboxStack/toolbox-base/docs/TOOLS.md @@ -0,0 +1,20 @@ +# ๐Ÿงฐ TSYSDevStack Toolbox Base โ€“ Installed Tooling + +| Category | Tooling | Notes | +|----------|---------|-------| +| Shells & Prompts | ๐Ÿš `zsh` โ€ข ๐ŸŸ `fish` โ€ข ๐Ÿง‘โ€๐Ÿ’ป `bash` โ€ข โญ `starship` โ€ข ๐Ÿ’Ž `oh-my-zsh` | Shell choice is flexible; Starship prompt configured for all three; oh-my-zsh with `git` + `fzf` plugins. | +| Runtime & CLI Managers | ๐Ÿช„ `mise` โ€ข ๐Ÿ’ง `aqua` | `mise` manages language/tool runtimes (activated for zsh/bash/fish); `aqua` manages standalone CLIs (global config under `~/.config/aquaproj-aqua/aqua.yaml`). | +| Core CLI Utilities | ๐Ÿ“ฆ `curl` โ€ข ๐Ÿ“ฅ `wget` โ€ข ๐Ÿ” `ca-certificates` โ€ข ๐Ÿงญ `git` โ€ข ๐Ÿ”ง `build-essential` + headers โ€ข ๐Ÿ” `ripgrep` โ€ข ๐Ÿงญ `fzf` โ€ข ๐Ÿ“ `fd` โ€ข ๐Ÿ“– `bat` โ€ข ๐Ÿ”— `openssh-client` โ€ข ๐Ÿงต `tmux` โ€ข ๐Ÿ–ฅ๏ธ `screen` โ€ข ๐Ÿ“Š `jq` | Provides day-to-day development ergonomics and compile toolchain requirements (openssl/zlib/sqlite/readline/ffi headers, pkg-config). | +| Aqua-Managed CLIs | ๐Ÿ™ `gh` โ€ข ๐Ÿซ– `tea` โ€ข ๐ŸŒ€ `lazygit` | Installed via aqua; extendable by editing `~/.config/aquaproj-aqua/aqua.yaml`. | +| Container Workflow | ๐Ÿณ Docker integration via host Docker socket | Compose file binds `/var/run/docker.sock` read-only; `docker` CLI expected on host. | +| Misc | ๐Ÿ—‚๏ธ `/workspace` mount (rw) โ€ข ๐Ÿ‘ค Non-root user `toolbox` mapped to host UID/GID | Container runs as the mapped host user; current repo mounted to `/workspace`. | + +## Usage Highlights + +1. Build the image: `./build.sh` +2. Start the dev environment: `./run.sh up` +3. Attach a shell: `docker exec -it tsysdevstack-toolboxstack-toolbox-base zsh` (or `bash` / `fish`) +4. Manage runtimes: `mise use python@3.12` (per project) +5. Install extra CLIs: add entries to `~/.config/aquaproj-aqua/aqua.yaml` then run `aqua install` + +> โ„น๏ธ **Documentation policy:** Update this file whenever tooling changes (new utilities, removals, or configuration shifts) so contributors always have an accurate inventory.