Skip to content
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

docker-buildx: symlink plugin to brew owned cli-plugins #162200

Merged
merged 2 commits into from
Mar 6, 2024
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
24 changes: 14 additions & 10 deletions Formula/d/docker-buildx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ class DockerBuildx < Formula
url "https://github.com/docker/buildx/archive/refs/tags/v0.12.1.tar.gz"
sha256 "9cc176ed55e7c423c23de35bd31df3b449261f1b90765c17f003bd4de86a6aa4"
license "Apache-2.0"
revision 1
head "https://github.com/docker/buildx.git", branch: "master"

bottle do
sha256 cellar: :any_skip_relocation, arm64_sonoma: "a6abbcb1fdf69b1bda1b4d4bddfb3c5774ca5214f5834b112285b6c91d925e5e"
sha256 cellar: :any_skip_relocation, arm64_ventura: "7ff063ad2ded0882713a52fb5ada72026874140c53ece771744fa9f120fdad7c"
sha256 cellar: :any_skip_relocation, arm64_monterey: "ce19013244887dfe3ebb202adb007e9c02c146fe83a8fdec42a4015d140166db"
sha256 cellar: :any_skip_relocation, sonoma: "be7748b244d1a6a6c624cc5628703c81a1a722f67e80e90e2b051ed7c6b2fff0"
sha256 cellar: :any_skip_relocation, ventura: "445a345e2e5657c0abf87a8da5247f7b2e3215e5a760e32507bb13edac7922db"
sha256 cellar: :any_skip_relocation, monterey: "c3dcd72e2609dcf56bb057dcf9583bae82dec934303a7aa48cce55adeb0dcdc2"
sha256 cellar: :any_skip_relocation, x86_64_linux: "7b1798be0b31d54c97c5ede749f626a218989fe7e032155b84971a381e8f57c2"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "417db1ab6fcaab6ddf8304313125b6006d815bf4f0431c733b57eb5fc1ccc438"
sha256 cellar: :any_skip_relocation, arm64_ventura: "87f72da9d56c73b1bbbe680481b3f38b6a0729ee3462c9cf370c088cc969040f"
sha256 cellar: :any_skip_relocation, arm64_monterey: "d92d6aeae257edf5a22d6db05e201eb5f94065d1b54d6a51886cfaac8ef6ffc5"
sha256 cellar: :any_skip_relocation, sonoma: "21890d0625b3e7d5c356e13b083d2e8497c079e3ac4587266430e5ce5381211c"
sha256 cellar: :any_skip_relocation, ventura: "a9efc20b954edc276e48730619ada75eac4fc6d5189f0e0ed688282a3584c19f"
sha256 cellar: :any_skip_relocation, monterey: "cc8b641b97275571880709751ff949194f8e5010614b12feef893b7c7bd8842b"
sha256 cellar: :any_skip_relocation, x86_64_linux: "0250cef9bbcb694bcefa35d2ad98470bec3920324048fa56456986b3d33b1fbf"
end

depends_on "go" => :build
Expand All @@ -27,16 +28,19 @@ def install

system "go", "build", *std_go_args(ldflags: ldflags), "./cmd/buildx"

(lib/"docker/cli-plugins").install_symlink bin/"docker-buildx"

doc.install Dir["docs/reference/*.md"]

generate_completions_from_executable(bin/"docker-buildx", "completion")
end

def caveats
<<~EOS
docker-buildx is a Docker plugin. For Docker to find this plugin, symlink it:
mkdir -p ~/.docker/cli-plugins
ln -sfn #{opt_bin}/docker-buildx ~/.docker/cli-plugins/docker-buildx
docker-buildx is a Docker plugin. For Docker to find the plugin, add "cliPluginsExtraDirs" to ~/.docker/config.json:
"cliPluginsExtraDirs": [
"#{HOMEBREW_PREFIX}/lib/docker/cli-plugins"
]
EOS
end

Expand Down
Loading