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

Commit

Permalink
Merge pull request #224 from a1exsh/bugfix/199-explicitly-start-docke…
Browse files Browse the repository at this point in the history
…r-container

Start docker container if it already exists. Fix #199
  • Loading branch information
Felix Mueller committed May 10, 2016
2 parents 12d1a4a + 63714cc commit 6953d3a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion runtime/opt/taupage/runtime/Docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,16 @@ def main(args):
logging.error("Failed to list existing docker containers: %s", str(e))
# not a fatal error, continue

if not already_exists:
if already_exists:
try:
cmd = ['docker', 'start', 'taupageapp']
logging.info('Starting existing Docker container: {}'.format(cmd))
if not args.dry_run:
subprocess.check_output(cmd)
except Exception as e:
logging.error('Docker start of existing container failed: %s', str(e))
sys.exit(1)
else:
registry = extract_registry(source)

if registry:
Expand Down

0 comments on commit 6953d3a

Please sign in to comment.