website icon indicating copy to clipboard operation
website copied to clipboard

Migrate to .NET 8 LTS, consolidate Docker infrastructure, and fix GitHub workflows

Open Copilot opened this issue 7 months ago • 6 comments

This PR migrates all F# projects from .NET Core 3.0/3.1 to .NET 8 LTS, consolidates Docker infrastructure, and updates GitHub workflows to use supported runner images.

F# Projects Migration

Updated all F# projects to target .NET 8:

  • src/visualizations/App.fsproj from netcoreapp3.0 to net8.0
  • tests/Visualizations.Tests/Visualizations.Tests.fsproj from netcoreapp3.1 to net8.0
  • Owid.Analyzer/Owid.Analyzer.fsproj from netcoreapp3.1 to net8.0

Docker Infrastructure Consolidation

Replaced the problematic two-Dockerfile setup with a single consolidated Dockerfile:

Before: Separate base.Dockerfile (for ghcr.io/sledilnik/website-base) + Dockerfile After: Single Dockerfile with multi-stage build

The new Docker setup:

  • Uses node:20-alpine3.22 base image with --platform=$BUILDPLATFORM for native build performance
  • Manually installs .NET 8 SDK with multi-architecture support (amd64/arm64)
  • Eliminates dependency on potentially outdated base images
  • Follows Docker best practices with optimized layer caching

GitHub Workflows

Fixed deprecated actions and updated versions:

  • Updated all workflows from ubuntu-20.04 to ubuntu-22.04
  • Fixed deprecated actions/[email protected] to actions/cache@v4
  • Updated Node.js version from 18 to 20.11.1 across all workflows
  • Updated actions/setup-node to v4 and other actions to latest versions

DevContainer Updates

Updated development environment to match production:

  • Upgraded from .NET Core 3.1 to .NET 8.0
  • Updated Node.js from 14.0 to 20.11.1
  • Updated F# runtime settings to net8.0

Package Compatibility

Fixed Node.js 20 compatibility issues:

  • Added yarn resolution for @achrinza/[email protected]
  • Downgraded @vue/cli-plugin-babel to maintain Vue CLI v4 consistency

Benefits

  • Security: .NET 8 LTS support until November 2026
  • Performance: Native build platform and latest runtime optimizations
  • Reliability: Eliminates base image dependency issues
  • Multi-arch: Native support for both amd64 and arm64 architectures
  • Maintenance: All workflows use currently supported runner images

The docker build . command now works reliably on both amd64 and arm64 architectures without external image dependencies.

Fixes #1364.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot avatar Jul 25 '25 13:07 Copilot