Concurrent local and remote docker login

Login to the local and remote docker registries concurrently to shave
a couple of seconds off a deployment.
This commit is contained in:
Donal McBreen
2024-01-11 10:02:04 +00:00
parent aea55480ad
commit 00e3015142

View File

@@ -1,8 +1,7 @@
class Kamal::Cli::Registry < Kamal::Cli::Base
desc "login", "Log in to registry locally and remotely"
def login
run_locally { execute *KAMAL.registry.login }
on(KAMAL.hosts) { execute *KAMAL.registry.login }
on([ :local ] + KAMAL.hosts) { execute *KAMAL.registry.login }
# FIXME: This rescue needed?
rescue ArgumentError => e
puts e.message