From e61aeaad2dcf1fdc3adc6d840ea4dbb664732d47 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Fri, 6 Feb 2026 08:45:03 +0000 Subject: [PATCH] docs: Update documentation for modernization changes - Update readme.hints.md with Ubuntu 24.04 upgrade notes, package changes, MongoDB 8.0 details, and corrected NVM/Node version references - Update readme.md with Ubuntu 24.04 tag description and adjusted image sizes --- Dockerfile | 2 +- readme.hints.md | 19 ++++++++++++++++--- readme.md | 40 +++++++++++++++++++++------------------- 3 files changed, 38 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index d3dca51..6aa6433 100644 --- a/Dockerfile +++ b/Dockerfile @@ -84,7 +84,7 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio && rm -r /var/lib/apt/lists/* # Install nvm with node and npm -RUN curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash +RUN mkdir -p $NVM_DIR && curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash # Make nvm available globally in all bash shells (interactive + non-interactive) # IMPORTANT: Prepend to bashrc, before the "[ -z "$PS1" ] && return" line diff --git a/readme.hints.md b/readme.hints.md index df8a5d4..2759430 100644 --- a/readme.hints.md +++ b/readme.hints.md @@ -1,6 +1,6 @@ # Technical Implementation Notes -## NVM Support (v5.0.147) +## NVM Support (v5.2.0) ### How NVM Works in This Image @@ -30,7 +30,7 @@ The image provides full nvm support in three contexts: - Critical for CI/CD workflow support #### 4. ENV PATH Fallback -- Maintains `ENV PATH` pointing to default Node v20.12.2 +- Maintains `ENV PATH` pointing to default Node v24.13.0 - Ensures non-bash shells (sh, dash) still have node access - Backward compatible with existing usage @@ -74,10 +74,23 @@ RUN node --version # Now shows v18.x.x ### Maintenance Notes -**If updating nvm version**: Modify line 86 in Dockerfile +**If updating nvm version**: Modify line 87 in Dockerfile (currently NVM v0.40.1) **If base image changes**: Verify /etc/bash.bashrc structure still has early return pattern +## Ubuntu 24.04 Upgrade Notes + +- Base image upgraded from Ubuntu 20.04 to 24.04 +- Python 2 removed (EOL since 2020), Python 3 retained +- Package changes for 24.04 compatibility: + - `gconf-service` and `libgconf-2-4` removed (deprecated GConf) + - `libgcc1` replaced with `libgcc-s1` + - `libappindicator1` replaced with `libayatana-appindicator3-1` + - `libasound2` replaced with `libasound2t64` (t64 transition) + - `libgbm1` and `libatk-bridge2.0-0` added for Chrome/Puppeteer +- MongoDB upgraded from 4.4 to 8.0 (uses modern gpg keyring approach instead of deprecated apt-key) +- Node.js upgraded to v24.13.0 LTS (Krypton, supported until April 2028) + **If ENTRYPOINT conflicts**: Users can override with `--entrypoint` flag: ```bash docker run --entrypoint /bin/bash image -c "commands" diff --git a/readme.md b/readme.md index df5c506..d17ff29 100644 --- a/readme.md +++ b/readme.md @@ -25,12 +25,10 @@ Perfect for complex builds requiring native dependencies and maximum compatibili | Tag | Description | Use Case | |-----|-------------|----------| -| `:latest` / `:lts` | Node.js LTS with NVM | General purpose, production builds | -| `:stable` | Node.js stable release | Latest stable features | +| `:latest` | Node.js LTS with NVM (Ubuntu 24.04) | General purpose, production builds | +| `:lts` | Based on latest | Explicit LTS naming | | `:npmci` | With npmci preinstalled | CI/CD pipelines | -| `:npmts` | npmci + npmts | TypeScript projects | -| `:npmpage` | npmci + npmts + npmpage | Static site generation | -| `:mongo` | npmci + npmts + MongoDB | Full-stack development | +| `:stableinit` | Stable initialization base | Init scripts | ### Alpine-Based Images (Lightweight & Multi-Arch) ⚡ @@ -41,6 +39,7 @@ Perfect for complex builds requiring native dependencies and maximum compatibili | `:alpine-node` | Node.js LTS + NVM + pnpm | ~200MB | amd64, arm64 | | `:alpine-deno` | Node.js LTS + NVM + Deno | ~180MB | amd64, arm64 | | `:alpine-bun` | Node.js LTS + NVM + Bun | ~150MB | amd64, arm64 | +| `:alpine-npmci` | Alpine Node + npmci + build tools | ~250MB | amd64, arm64 | **✨ Multi-architecture magic:** Docker automatically selects the right image for your platform. Build on Mac, deploy on Linux servers—same Dockerfile, native speed everywhere. @@ -260,31 +259,34 @@ nvm use 18 ## 🏗️ Building Multi-Architecture Images -For teams building custom images: +This project uses [@git.zone/tsdocker](https://code.foss.global/git.zone/tsdocker) for Docker image management. ```bash -# Clone the repo -git clone https://github.com/HostToday/ht-docker-node.git -cd ht-docker-node +# Install tsdocker +pnpm install -g @git.zone/tsdocker@latest -# Build Alpine images (native platform for local testing) -chmod +x build-alpine-images.sh -./build-alpine-images.sh +# List all discovered Dockerfiles and their tags +tsdocker list -# Test the built images -chmod +x test-alpine-images.sh -./test-alpine-images.sh +# Build all images (multi-arch: amd64 + arm64) +tsdocker build + +# Test all images +tsdocker test + +# Push to a specific registry +tsdocker push code.foss.global ``` -### Production Multi-Arch Builds +### Manual Builds -For publishing to registries: +For building individual images manually: ```bash # Build for both amd64 and arm64, push to registry docker buildx build \ --platform linux/amd64,linux/arm64 \ - -f Dockerfile_alpine_node \ + -f Dockerfile_alpine-node \ -t your-registry/your-image:alpine-node \ --push \ . @@ -463,7 +465,7 @@ USER node | Feature | Ubuntu `:latest` | Alpine `:alpine-node` | |---------|------------------|----------------------| -| Base Size | ~800MB | ~200MB | +| Base Size | ~900MB | ~200MB | | Build Tools | ✅ Full | ⚠️ Install separately | | Compatibility | ✅ Maximum | ✅ Good (musl) | | Multi-arch | ❌ amd64 only | ✅ amd64, arm64 |