vagrant/plugins/providers/docker/action/stop.rb
oss-core-libraries-dashboard[bot] 73228596f4
[COMPLIANCE] Update Copyright and License Headers (Batch 3 of 7) (#13763)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2025-12-22 16:46:39 +05:30

24 lines
582 B
Ruby

# Copyright IBM Corp. 2010, 2025
# SPDX-License-Identifier: BUSL-1.1
module VagrantPlugins
module DockerProvider
module Action
class Stop
def initialize(app, env)
@app = app
end
def call(env)
machine = env[:machine]
driver = machine.provider.driver
if driver.running?(machine.id)
env[:ui].info I18n.t("docker_provider.messages.stopping")
driver.stop(machine.id, machine.provider_config.stop_timeout)
end
@app.call(env)
end
end
end
end
end