Allow logging out of registry

This commit is contained in:
David Heinemeier Hansson
2023-01-08 14:18:00 +01:00
parent 4b46449fdf
commit 14867a2f61
2 changed files with 9 additions and 0 deletions

View File

@@ -2,4 +2,8 @@ class Mrsk::Commands::Registry < Mrsk::Commands::Base
def login
"docker login #{config.registry["server"]} -u #{config.registry["username"]} -p #{config.registry["password"]}"
end
def logout
"docker logout #{config.registry["server"]}"
end
end

View File

@@ -9,5 +9,10 @@ namespace :mrsk do
run_locally { execute registry.login }
on(MRSK_CONFIG.servers) { execute registry.login }
end
desc "Logout of the registry remotely"
task :logout do
on(MRSK_CONFIG.servers) { execute registry.logout }
end
end
end