Пример #1
0
 @Override
 public InstanceProcess createProcess(Command command, String outputChannel)
     throws MachineException {
   final Integer pid = pidSequence.getAndIncrement();
   final InstanceProcess process =
       dockerMachineFactory.createProcess(
           command, container, outputChannel, String.format(PID_FILE_TEMPLATE, pid), pid);
   machineProcesses.put(pid, process);
   return process;
 }
Пример #2
0
 @Override
 public MachineRuntimeInfoImpl getRuntime() {
   if (machineRuntime == null) {
     try {
       final ContainerInfo containerInfo = docker.inspectContainer(container);
       machineRuntime =
           new MachineRuntimeInfoImpl(
               dockerMachineFactory.createMetadata(containerInfo, node.getHost()));
     } catch (IOException e) {
       LOG.error(e.getLocalizedMessage(), e);
       return null;
     }
   }
   return machineRuntime;
 }