Skip to content

Conversation

@mitesch
Copy link
Contributor

@mitesch mitesch commented Jan 8, 2026

Description

Fixes:
#13464
#13426

Related issue:

Check list

  • Related issue / work item is attached
  • Tests are written (if applicable)
  • Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

Copilot AI review requested due to automatic review settings January 8, 2026 17:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request aims to add docker-cli installation to the ubuntu-slim image, fix apt source configurations to use the standard Ubuntu archive instead of Azure's mirror, and preserve apt package lists during cleanup. The changes address two reported issues: #13464 and #13426.

Key Changes:

  • Adds docker-cli installation and corresponding test
  • Modifies apt source configuration to use archive.ubuntu.com instead of azure.archive.ubuntu.com
  • Removes cleanup of /var/lib/apt/lists/* to keep apt package lists available
  • Adds set -eo pipefail temporarily during Docker build for better error handling

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
images/ubuntu-slim/test.sh Adds pipefail option and test for docker-cli installation
images/ubuntu-slim/scripts/helpers/cleanup.sh Removes deletion of apt lists to keep them available
images/ubuntu-slim/scripts/build/configure-apt.sh Removes redundant unattended-upgrades purge and jq installation code
images/ubuntu-slim/scripts/build/configure-apt-sources.sh Changes apt source URL from azure.archive to archive.ubuntu.com
images/ubuntu-slim/Dockerfile Adds docker-cli installation script invocation and temporary pipefail configuration

/tmp/scripts/build/install-python.sh && \
/tmp/scripts/build/install-zstd.sh && \
/tmp/scripts/build/install-pipx-packages.sh && \
/tmp/scripts/build/install-docker-cli.sh && \
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The script 'install-docker-cli.sh' is referenced here but does not appear to exist in the repository. This will cause the Docker build to fail when it reaches this line. You need to either create the missing installation script or remove this line if docker-cli installation is not yet ready.

Suggested change
/tmp/scripts/build/install-docker-cli.sh && \

Copilot uses AI. Check for mistakes.
run_test "google cloud SDK is installed" gcloud --version
run_test "git lfs is installed" git lfs version
run_test "powershell is installed" pwsh --version
run_test "docker-cli is installed" docker --version
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The test for docker-cli is added here, but the corresponding installation script (install-docker-cli.sh) referenced in the Dockerfile does not exist in the repository. This test will fail until the installation script is added.

Suggested change
run_test "docker-cli is installed" docker --version
# NOTE: docker-cli is not currently installed by this image; re-enable this test
# once the corresponding installation script is added to the build.
# run_test "docker-cli is installed" docker --version

Copilot uses AI. Check for mistakes.
# Usage: test.sh [IMAGE_NAME]
# If IMAGE_NAME is not provided, defaults to ubuntu-slim:test

set -o pipefail
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The 'set -eo pipefail' command is temporarily added to /etc/bash.bashrc during the build and then removed after all installation scripts complete. However, the test.sh file uses 'set -o pipefail' (without the 'e' flag). For consistency, consider using the same flags in both places, or document why different flags are used. The 'e' flag causes the shell to exit on any error, which may be desired during the build but not necessarily in the test script.

Suggested change
set -o pipefail
set -eo pipefail

Copilot uses AI. Check for mistakes.
/tmp/scripts/build/install-docker-cli.sh && \
/tmp/scripts/build/configure-system.sh && \
/tmp/scripts/helpers/cleanup.sh

Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

There is trailing whitespace on this otherwise empty line. Consider removing it to maintain consistent formatting.

Suggested change

Copilot uses AI. Check for mistakes.
@kixorz
Copy link

kixorz commented Jan 8, 2026

This is useful, can you maybe finish it and merge it?

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.

3 participants