mirror of
https://github.com/trailofbits/buttercup
synced 2026-06-21 14:11:39 +00:00
fix(setup-local): detect existing buildx, fall back to docker-buildx pkg (#546)
The install_docker helper hardcoded `docker-buildx-plugin` (Docker's official apt repo name), so setup-local failed on systems where Docker was installed from Ubuntu's repos, which ship the same plugin as `docker-buildx`. Skip the install when `docker buildx version` already works, and probe apt-cache to pick whichever package name is available. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
ec7031c5ef
commit
e516fe42fb
+13
-3
@@ -73,9 +73,19 @@ install_docker() {
|
||||
fi
|
||||
|
||||
# Install buildx plugin (required for deploy target)
|
||||
print_status "Installing Docker buildx plugin..."
|
||||
sudo apt install -y docker-buildx-plugin
|
||||
print_success "Docker buildx plugin installed"
|
||||
if docker buildx version >/dev/null 2>&1; then
|
||||
print_success "Docker buildx plugin is already installed"
|
||||
else
|
||||
print_status "Installing Docker buildx plugin..."
|
||||
# Package name differs by source: Docker's official apt repo ships
|
||||
# `docker-buildx-plugin`, while Ubuntu's repos ship `docker-buildx`.
|
||||
if apt-cache show docker-buildx-plugin >/dev/null 2>&1; then
|
||||
sudo apt install -y docker-buildx-plugin
|
||||
else
|
||||
sudo apt install -y docker-buildx
|
||||
fi
|
||||
print_success "Docker buildx plugin installed"
|
||||
fi
|
||||
}
|
||||
|
||||
install_uv() {
|
||||
|
||||
Reference in New Issue
Block a user