Merge pull request #2314 from dnephin/fix_up_require_build_error
Fix `up` "requires build" error
This commit is contained in:
commit
67dc90ec0e
4 changed files with 82 additions and 69 deletions
|
|
@ -414,6 +414,7 @@ class Service(object):
|
|||
return [
|
||||
self.recreate_container(
|
||||
container,
|
||||
do_build=do_build,
|
||||
timeout=timeout,
|
||||
attach_logs=should_attach_logs
|
||||
)
|
||||
|
|
@ -435,10 +436,12 @@ class Service(object):
|
|||
else:
|
||||
raise Exception("Invalid action: {}".format(action))
|
||||
|
||||
def recreate_container(self,
|
||||
container,
|
||||
timeout=DEFAULT_TIMEOUT,
|
||||
attach_logs=False):
|
||||
def recreate_container(
|
||||
self,
|
||||
container,
|
||||
do_build=False,
|
||||
timeout=DEFAULT_TIMEOUT,
|
||||
attach_logs=False):
|
||||
"""Recreate a container.
|
||||
|
||||
The original container is renamed to a temporary name so that data
|
||||
|
|
@ -450,7 +453,7 @@ class Service(object):
|
|||
container.stop(timeout=timeout)
|
||||
container.rename_to_tmp_name()
|
||||
new_container = self.create_container(
|
||||
do_build=False,
|
||||
do_build=do_build,
|
||||
previous_container=container,
|
||||
number=container.labels.get(LABEL_CONTAINER_NUMBER),
|
||||
quiet=True,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue