switch to miniconda3 base image, add Java via SDKMAN
- Base image: continuumio/miniconda3 (conda + python 3 out of the box) - Java: installed via SDKMAN (sdk install java) — latest LTS by default - Node.js: nvm install kept from previous change - All tool envs (nvm, sdkman) sourced before exec so Python and all child processes (exec-tool, jobs) inherit the full PATH
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
mcp-bash:
|
mcp-bash:
|
||||||
image: python:3.12-slim
|
image: continuumio/miniconda3:latest
|
||||||
container_name: mcp-bash
|
container_name: mcp-bash
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
working_dir: /workspace
|
working_dir: /workspace
|
||||||
|
|||||||
+19
-4
@@ -4,19 +4,34 @@ set -e
|
|||||||
# ─── System packages ──────────────────────────────────────────────────────────
|
# ─── System packages ──────────────────────────────────────────────────────────
|
||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
curl wget git vim nano htop procps jq less unzip
|
curl wget git vim nano htop procps jq less unzip zip \
|
||||||
|
build-essential ca-certificates
|
||||||
|
|
||||||
# ─── Python dependencies ──────────────────────────────────────────────────────
|
# ─── Python dependencies (via conda base env) ─────────────────────────────────
|
||||||
pip install -q -r /app/requirements.txt
|
pip install -q -r /app/requirements.txt
|
||||||
|
|
||||||
# ─── Custom setup (add your own steps below) ──────────────────────────────────
|
# ─── Node.js via nvm ──────────────────────────────────────────────────────────
|
||||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash
|
||||||
|
|
||||||
export NVM_DIR="$HOME/.nvm"
|
export NVM_DIR="$HOME/.nvm"
|
||||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
|
||||||
|
|
||||||
nvm install 24
|
nvm install 24
|
||||||
|
|
||||||
|
# ─── Java via SDKMAN ──────────────────────────────────────────────────────────
|
||||||
|
curl -s "https://get.sdkman.io" | bash
|
||||||
|
|
||||||
|
export SDKMAN_DIR="$HOME/.sdkman"
|
||||||
|
[ -s "$SDKMAN_DIR/bin/sdkman-init.sh" ] && \. "$SDKMAN_DIR/bin/sdkman-init.sh"
|
||||||
|
|
||||||
|
sdk install java
|
||||||
|
|
||||||
|
# ─── Custom setup (add your own steps below) ──────────────────────────────────
|
||||||
|
# Example:
|
||||||
|
# conda install -y pandas numpy
|
||||||
|
# sdk install gradle
|
||||||
|
# npm install -g typescript
|
||||||
|
|
||||||
# ─── Start server ─────────────────────────────────────────────────────────────
|
# ─── Start server ─────────────────────────────────────────────────────────────
|
||||||
exec python -u /app/main.py
|
exec python -u /app/main.py
|
||||||
|
|||||||
Reference in New Issue
Block a user