code: @Override
  	public void terminateMachine( TargetHandlerParameters parameters, String machineId )
  	throws TargetException {
  
  		this.logger.fine( "Terminating machine " + machineId );
  		try {
  			cancelMachineConfigurator( machineId );
  			DockerClient dockerClient = DockerUtils.createDockerClient( parameters.getTargetProperties());
  			Container container = DockerUtils.findContainerByIdOrByName( machineId, dockerClient );
  
  			// The case "container == null" is possible.
  			// Indeed, it may have been killed manually. This method will then
  			// just mark the Roboconf instance as "not deployed" without throwing an exception.
  			if( container != null ) {
  
  				// Stop the container
  				ContainerState state = DockerUtils.getContainerState( machineId, dockerClient );
  				if( state != null
  						&& ( extractBoolean( state.getRunning()) || extractBoolean( state.getPaused())))
  					dockerClient.killContainerCmd( container.getId()).exec();
  
  				dockerClient.removeContainerCmd( container.getId()).withForce( true ).exec();
  
  				// Delete the volume we used to share user data
  				// (container names are prefixed by their parent, here "/").
  				// See https://github.com/moby/moby/issues/6705
  				String containerName = container.getNames()[ 0 ].substring( 1 );
  				File userDataDir = this.containerIdToVolume.remove( containerName );
  				Utils.deleteFilesRecursivelyAndQuietly( userDataDir );
  			}
  
  		} catch( Exception e ) {
  			throw new TargetException( e );
  		}
  	}
docs: /*
  (non-Javadoc)
  @see net.roboconf.target.api.TargetHandler
  #terminateMachine(net.roboconf.target.api.TargetHandlerParameters, java.lang.String)