Skip to content

Add Dockerfile for legacy Linux build environment with Ubuntu 18.04, Python 3.8, Node.js 16, and GCC 8#1

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/fix-7327e687-9ecf-4231-ae48-6132732e1ba1
Closed

Add Dockerfile for legacy Linux build environment with Ubuntu 18.04, Python 3.8, Node.js 16, and GCC 8#1
Copilot wants to merge 1 commit intomainfrom
copilot/fix-7327e687-9ecf-4231-ae48-6132732e1ba1

Conversation

Copy link
Copy Markdown

Copilot AI commented Sep 19, 2025

This PR adds a complete Docker-based build environment for creating legacy Linux versions of electerm. The implementation provides a stable, reproducible build environment with specific versions required for legacy compatibility.

What's Added

Dockerfile.legacy-linux - A comprehensive Docker image based on Ubuntu 18.04 that includes:

  • Python 3.8 with proper system integration via update-alternatives
  • Node.js 16 installed from NodeSource repository for legacy compatibility
  • GCC 8 configured as the default compiler
  • Essential build tools and Electron application dependencies
  • Non-root builder user for secure building practices

validate-environment.sh - A validation script that verifies:

  • All tool versions are correctly installed
  • Compiler functionality works properly
  • Python and Node.js runtimes are operational
  • System environment is ready for building

Updated README.md with comprehensive documentation covering:

  • Build and usage instructions
  • Environment validation procedures
  • Tool specifications and versions
  • Example commands for building electerm

.dockerignore for optimized build context and faster builds

Usage Example

# Build the legacy environment
docker build -f Dockerfile.legacy-linux -t electerm-builder-legacy .

# Run with mounted source code
docker run -it --rm -v /path/to/electerm:/workspace electerm-builder-legacy

# Validate the environment
./validate-environment.sh

# Build electerm
npm install && npm run build

Technical Details

The Dockerfile follows Docker best practices including:

  • Multi-layer optimization with proper caching
  • Security-first approach with non-root user
  • Minimal attack surface by cleaning package caches
  • Proper environment variable configuration
  • Version pinning for reproducible builds

This provides a consistent, isolated build environment that eliminates "works on my machine" issues when building legacy Linux versions of electerm.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@zxdong262 zxdong262 closed this Sep 19, 2025
Copilot AI changed the title [WIP] a Dockerfile for building the legacy Linux version with Ubuntu 18.04, Python 3.8, Node.js 16, and GCC 8 Add Dockerfile for legacy Linux build environment with Ubuntu 18.04, Python 3.8, Node.js 16, and GCC 8 Sep 19, 2025
Copilot AI requested a review from zxdong262 September 19, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants