rolling snapshot push
This commit is contained in:
@@ -7,8 +7,7 @@ set -e
|
|||||||
|
|
||||||
# Load environment settings
|
# Load environment settings
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
CONFIG_DIR="${SCRIPT_DIR}/config"
|
ENV_FILE="${SCRIPT_DIR}/TSYSDevStack-SupportStack-Demo-Settings"
|
||||||
ENV_FILE="${CONFIG_DIR}/TSYSDevStack-SupportStack-Demo-Settings"
|
|
||||||
|
|
||||||
if [ ! -f "$ENV_FILE" ]; then
|
if [ ! -f "$ENV_FILE" ]; then
|
||||||
echo "Error: Environment settings file not found at $ENV_FILE"
|
echo "Error: Environment settings file not found at $ENV_FILE"
|
||||||
@@ -22,7 +21,7 @@ echo "====================================="
|
|||||||
|
|
||||||
# Test 1: Verify all containers are running
|
# Test 1: Verify all containers are running
|
||||||
echo "Test 1: Checking if 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
|
all_running=true
|
||||||
for container in "${containers[@]}"; do
|
for container in "${containers[@]}"; do
|
||||||
@@ -67,7 +66,7 @@ echo ""
|
|||||||
echo "Test 3: Checking service configurations..."
|
echo "Test 3: Checking service configurations..."
|
||||||
|
|
||||||
# Check if Docker socket proxy is running and accessible by other services
|
# 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"
|
echo "✓ Docker socket proxy is running internally"
|
||||||
else
|
else
|
||||||
echo "⚠ Docker socket proxy internal connection check skipped (not required to pass)"
|
echo "⚠ Docker socket proxy internal connection check skipped (not required to pass)"
|
||||||
|
|||||||
@@ -18,8 +18,16 @@ RUN apt-get update \
|
|||||||
openssh-client \
|
openssh-client \
|
||||||
ripgrep \
|
ripgrep \
|
||||||
tmux \
|
tmux \
|
||||||
|
screen \
|
||||||
fd-find \
|
fd-find \
|
||||||
bat \
|
bat \
|
||||||
|
build-essential \
|
||||||
|
pkg-config \
|
||||||
|
libssl-dev \
|
||||||
|
zlib1g-dev \
|
||||||
|
libffi-dev \
|
||||||
|
libsqlite3-dev \
|
||||||
|
libreadline-dev \
|
||||||
wget \
|
wget \
|
||||||
zsh \
|
zsh \
|
||||||
&& apt-get clean \
|
&& 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 \
|
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
|
&& 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
|
# Create non-root user with matching UID/GID for host mapping
|
||||||
RUN if getent passwd "${USER_ID}" >/dev/null; then \
|
RUN if getent passwd "${USER_ID}" >/dev/null; then \
|
||||||
existing_user="$(getent passwd "${USER_ID}" | cut -d: -f1)"; \
|
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 'mkdir -p ~/.config' \
|
||||||
&& su - "${USERNAME}" -c 'sed -i "s/^plugins=(git)$/plugins=(git fzf)/" ~/.zshrc' \
|
&& 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 "\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
|
COPY aqua.yaml /tmp/aqua.yaml
|
||||||
|
|
||||||
@@ -72,7 +87,7 @@ RUN mkdir -p /workspace \
|
|||||||
&& chown "${USER_ID}:${GROUP_ID}" /workspace
|
&& chown "${USER_ID}:${GROUP_ID}" /workspace
|
||||||
|
|
||||||
ENV SHELL=/usr/bin/zsh \
|
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
|
WORKDIR /workspace
|
||||||
USER ${USERNAME}
|
USER ${USERNAME}
|
||||||
|
|||||||
26
artifacts/ToolboxStack/toolbox-base/PROMPT
Normal file
26
artifacts/ToolboxStack/toolbox-base/PROMPT
Normal file
@@ -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.
|
||||||
20
artifacts/ToolboxStack/toolbox-base/docs/TOOLS.md
Normal file
20
artifacts/ToolboxStack/toolbox-base/docs/TOOLS.md
Normal file
@@ -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.
|
||||||
Reference in New Issue
Block a user