lib/kamal/commands/builder/multiarch.rb in kamal-1.3.1 vs lib/kamal/commands/builder/multiarch.rb in kamal-1.4.0

- old
+ new

@@ -8,11 +8,11 @@ end def push docker :buildx, :build, "--push", - "--platform", "linux/amd64,linux/arm64", + "--platform", platform_names, "--builder", builder_name, *build_options, build_context end @@ -23,7 +23,15 @@ end private def builder_name "kamal-#{config.service}-multiarch" + end + + def platform_names + if local_arch + "linux/#{local_arch}" + else + "linux/amd64,linux/arm64" + end end end