-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add docker-cli, fix apt sources, and keep apt lists #13511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.cominstead ofazure.archive.ubuntu.com - Removes cleanup of
/var/lib/apt/lists/*to keep apt package lists available - Adds
set -eo pipefailtemporarily 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 && \ |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
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.
| /tmp/scripts/build/install-docker-cli.sh && \ |
| 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 |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
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.
| 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 |
| # Usage: test.sh [IMAGE_NAME] | ||
| # If IMAGE_NAME is not provided, defaults to ubuntu-slim:test | ||
|
|
||
| set -o pipefail |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
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.
| set -o pipefail | |
| set -eo pipefail |
| /tmp/scripts/build/install-docker-cli.sh && \ | ||
| /tmp/scripts/build/configure-system.sh && \ | ||
| /tmp/scripts/helpers/cleanup.sh | ||
|
|
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
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.
|
This is useful, can you maybe finish it and merge it? |
Description
Fixes:
#13464
#13426
Related issue:
Check list