Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Commit

Permalink
Merge pull request #645 from gamechanger/tnt-login-bugs
Browse files Browse the repository at this point in the history
Fix bugs with env and down machine on required login
  • Loading branch information
thieman committed Feb 15, 2016
2 parents 69e7e00 + c56878b commit 4350106
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions dusty/commands/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def prep_for_start_local_env(pull_repos):
assembled_spec = spec_assembler.get_assembled_specs()
if not assembled_spec[constants.CONFIG_BUNDLES_KEY]:
raise RuntimeError('No bundles are activated. Use `dusty bundles` to activate bundles before running `dusty up`.')
virtualbox.initialize_docker_vm()

def log_in_to_required_registries():
"""Client-side command which runs the user through a login flow
Expand All @@ -49,8 +50,6 @@ def start_local_env(recreate_containers):
local environment go."""

assembled_spec = spec_assembler.get_assembled_specs()
virtualbox.initialize_docker_vm()

required_absent_assets = virtualbox.required_absent_assets(assembled_spec)
if required_absent_assets:
raise RuntimeError('Assets {} are specified as required but are not set. Set them with `dusty assets set`'.format(required_absent_assets))
Expand Down
3 changes: 2 additions & 1 deletion dusty/systems/docker/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from ...log import log_to_client
from ...memoize import memoized
from ...subprocess import check_call_demoted
from . import get_docker_env

def registry_from_image(image_name):
"""Returns the Docker registry host associated with
Expand Down Expand Up @@ -59,7 +60,7 @@ def log_in_to_registry(registry):
args.append(registry)

try:
check_call_demoted(['docker', 'login'] + args)
check_call_demoted(['docker', 'login'] + args, env=get_docker_env())
except CalledProcessError:
log_to_client('\nLogin failed, please try again for {} (Ctrl-C to quit)\n'.format(registry))
else:
Expand Down

0 comments on commit 4350106

Please sign in to comment.