Prefix container hostname with the underlying one
To make it easier to identity where a docker container is running, prefix its hostname with the underlying one from the host. Docker chooses a 12 character random hex string by default, so we'll keep that as the suffix.
This commit is contained in:
@@ -29,7 +29,7 @@ class Mrsk::Cli::App < Mrsk::Cli::Base
|
||||
execute *auditor.record("Booted app version #{version}"), verbosity: :debug
|
||||
|
||||
old_version = capture_with_info(*app.current_running_version, raise_on_non_zero_exit: false).strip
|
||||
execute *app.start_or_run
|
||||
execute *app.start_or_run(hostname: "#{host}-#{SecureRandom.hex(6)}")
|
||||
|
||||
Mrsk::Utils::HealthcheckPoller.wait_for_healthy(pause_after_ready: true) { capture_with_info(*app.status(version: version)) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user