Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion containers/agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ RUN set -eux; \

# Upgrade all packages to pick up security patches
# Addresses CVE-2023-44487 (HTTP/2 Rapid Reset) and other known vulnerabilities
RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
# Retry logic handles transient mirror sync failures during apt-get update
RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/* || \
(echo "apt-get upgrade failed, retrying with fresh package index..." && \
Comment on lines +53 to +55

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The retry log message says "apt-get upgrade failed", but this block is also retrying failures from apt-get update (which is the stated motivation). Consider updating the message (and/or the preceding comment) to reflect that either apt-get update or apt-get upgrade can fail here, so build logs are less misleading during investigations.

Suggested change
# Retry logic handles transient mirror sync failures during apt-get update
RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/* || \
(echo "apt-get upgrade failed, retrying with fresh package index..." && \
# Retry logic handles transient mirror sync failures during apt-get update or apt-get upgrade
RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/* || \
(echo "apt-get update or upgrade failed, retrying with fresh package index..." && \

Copilot uses AI. Check for mistakes.
rm -rf /var/lib/apt/lists/* && \
apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*)

# Create non-root user with UID/GID matching host user
# This allows the user command to run with appropriate permissions
Expand Down