docs: def replace_container(self, new_target_image_name, go_home=None):
  		"""Replaces a container. Assumes we are in Docker context.
  		"""
  		shutit = self.shutit
  		shutit.log('Replacing container with ' + new_target_image_name + ', please wait...', level=logging.DEBUG)
  		shutit.log(shutit.print_session_state(), level=logging.DEBUG)
  
  		# Destroy existing container.
  		conn_module = None
  		for mod in shutit.conn_modules:
  			if mod.module_id == shutit.build['conn_module']:
  				conn_module = mod
  				break
  		if conn_module is None:
  			shutit.fail('''Couldn't find conn_module ''' + shutit.build['conn_module']) # pragma: no cover
  		container_id = shutit.target['container_id']
  		conn_module.destroy_container(shutit, 'host_child', 'target_child', container_id)
  
  		# Start up a new container.
  		shutit.target['docker_image'] = new_target_image_name
  		target_child = conn_module.start_container(shutit, self.pexpect_session_id)
  		conn_module.setup_target_child(shutit, target_child)
  		shutit.log('Container replaced', level=logging.DEBUG)
  		shutit.log(shutit.print_session_state(), level=logging.DEBUG)
  		# New session - log in. This makes the assumption that we are nested
  		# the same level in in terms of shells (root shell + 1 new login shell).
  		target_child = shutit.get_shutit_pexpect_session_from_id('target_child')
  		if go_home != None:
  			target_child.login(ShutItSendSpec(self,
  			                                  send=shutit_global.shutit_global_object.bash_startup_command,
  			                                  check_exit=False,
  			                                  echo=False,
  			                                  go_home=go_home))
  		else:
  			target_child.login(ShutItSendSpec(self,
  			                                  send=shutit_global.shutit_global_object.bash_startup_command,
  			                                  check_exit=False,
  			                                  echo=False))
  		return True