Add images command to see what's on the server for the service repository
This commit is contained in:
@@ -93,6 +93,11 @@ class Mrsk::Cli::App < Mrsk::Cli::Base
|
|||||||
on(MRSK.hosts) { |host| puts_by_host host, capture_with_info(*MRSK.app.list_containers) }
|
on(MRSK.hosts) { |host| puts_by_host host, capture_with_info(*MRSK.app.list_containers) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "images", "List all the app images currently on servers"
|
||||||
|
def images
|
||||||
|
on(MRSK.hosts) { |host| puts_by_host host, capture_with_info(*MRSK.app.list_images) }
|
||||||
|
end
|
||||||
|
|
||||||
desc "current", "Return the current running container ID"
|
desc "current", "Return the current running container ID"
|
||||||
def current
|
def current
|
||||||
on(MRSK.hosts) { |host| puts_by_host host, capture_with_info(*MRSK.app.current_container_id) }
|
on(MRSK.hosts) { |host| puts_by_host host, capture_with_info(*MRSK.app.current_container_id) }
|
||||||
|
|||||||
@@ -85,6 +85,10 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
|
|||||||
docker :container, :prune, "-f", *service_filter
|
docker :container, :prune, "-f", *service_filter
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def list_images
|
||||||
|
docker :image, :ls, config.repository
|
||||||
|
end
|
||||||
|
|
||||||
def remove_images
|
def remove_images
|
||||||
docker :image, :prune, "-a", "-f", *service_filter
|
docker :image, :prune, "-a", "-f", *service_filter
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user