@Transactional public void deployToContainerId( String applicationName, String containerId, File file, String destFile) throws ServiceException { try { Application application = this.findByNameAndUser(authentificationUtils.getAuthentificatedUser(), applicationName); Map<String, String> configShell = new HashMap<>(); String sshPort = application.getSShPortByContainerId(containerId); String rootPassword = application.getUser().getPassword(); configShell.put("port", sshPort); configShell.put("dockerManagerAddress", application.getManagerIp()); configShell.put("password", rootPassword); // send the file on container shellUtils.sendFile(file, rootPassword, sshPort, application.getManagerIp(), destFile); } catch (Exception e) { e.printStackTrace(); } }