Skip to content

Conversation

@ronit-1404
Copy link

Description

This PR adds retry logic to apt-get install commands in both development and production Dockerfiles to handle transient network connection failures during package downloads.

Changes Made

  • ✅ Added retry logic with --fix-missing flag to AMD64 stage (Chrome installation)
  • ✅ Added retry logic with --fix-missing flag to ARM64 stage (Chromium installation)
  • ✅ Applied changes to both Dockerfile.dev and Dockerfile for consistency
  • ✅ Maintained existing build optimizations and configurations

Technical Details

The fix implements a two-attempt strategy using the || (OR) operator:

  1. First attempt: Normal apt-get install execution
  2. Fallback: If first attempt fails, updates package lists and retries with --fix-missing flag

Before:

RUN apt-get update && apt-get install -yq google-chrome-stable libxss1 && \
    rm -rf /var/lib/apt/lists/*
    
    
this fixes #4820 

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.

1 participant