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

Start docker container if it already exists. Fix #199 #224

Merged
merged 1 commit into from
May 10, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion runtime/opt/taupage/runtime/Docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,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