[ubuntu-slim] Add Docker Compose and Buildx plugins (#13542)

Extends the existing Docker CLI installation (from #13511) with:
- Docker Compose plugin (docker-compose-plugin)
- Docker Buildx plugin (docker-buildx-plugin)
- Corresponding tests for compose and buildx commands

This provides better Docker tooling coverage while maintaining
the lightweight design (no Docker daemon included).

Ref: #13541
This commit is contained in:
Arshad Pasha
2026-01-19 19:19:56 +05:30
committed by GitHub
parent 5aa499517a
commit 061fbae809
2 changed files with 13 additions and 2 deletions

View File

@@ -1,7 +1,9 @@
#!/bin/bash -e
################################################################################
## File: install-docker-cli.sh
## Desc: Install docker cli, but not the engine
## Desc: Install Docker CLI and plugins (Compose, Buildx) but not the engine.
## The Docker daemon is not included since ubuntu-slim runs as a container.
## Users can mount the host's Docker socket or use Docker-in-Docker if needed.
################################################################################
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
@@ -12,4 +14,11 @@ echo \
apt-get update
apt-get install docker-ce-cli
# Install Docker CLI components (not the daemon)
# docker-ce-cli: Docker command line interface
# docker-buildx-plugin: Build with BuildKit
# docker-compose-plugin: Docker Compose V2
apt-get install --no-install-recommends -y \
docker-ce-cli \
docker-buildx-plugin \
docker-compose-plugin

View File

@@ -94,6 +94,8 @@ 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
run_test "docker compose is installed" docker compose version
run_test "docker buildx is installed" docker buildx version
# Quick check: ensure the imagedata JSON file was created during image build
run_test "imagedata JSON file exists" test -f /imagegeneration/imagedata.json