public void mountFiles(CreateContainerCmd createContainerCmd) { String videoFilesDiskPath = "/var/lib/jenkins/test-files"; Volume configVol = new Volume(KurentoTest.getTestFilesDiskPath()); createContainerCmd.withVolumes(configVol).withBinds(new Bind(videoFilesDiskPath, configVol)); }
createContainerCmd.withVolumes(configVol) .withBinds(new Bind(hostConfigFilePath, configVol)); createContainerCmd.withVolumes(testFilesVolume, workspaceVolume, configVol, dockerSock) .withBinds( new Bind(testFilesPath, testFilesVolume, AccessMode.ro), } else { createContainerCmd.withVolumes(testFilesVolume, workspaceVolume, dockerSock).withBinds( new Bind(testFilesPath, testFilesVolume, AccessMode.ro), new Bind(workspacePath, workspaceVolume, AccessMode.rw));
createContainerCmd.withVolumes(configVol) .withBinds(new Bind(hostConfigFilePath, configVol)); createContainerCmd.withVolumes(testFilesVolume, workspaceVolume, configVol, dockerSock) .withBinds( new Bind(testFilesPath, testFilesVolume, AccessMode.ro), } else { createContainerCmd.withVolumes(testFilesVolume, workspaceVolume, dockerSock).withBinds( new Bind(testFilesPath, testFilesVolume, AccessMode.ro), new Bind(workspacePath, workspaceVolume, AccessMode.rw));
public void mountFiles(CreateContainerCmd createContainerCmd) { String videoFilesDiskPath = "/var/lib/jenkins/test-files"; Volume configVol = new Volume(KurentoTest.getTestFilesDiskPath()); createContainerCmd.withVolumes(configVol).withBinds(new Bind(videoFilesDiskPath, configVol)); }
cmd.withVolumes(volumes.toArray(new Volume[volumes.size()])); cmd.withBinds(binds.toArray(new Bind[binds.size()]));
public void createContainer(String imageId, String containerName, boolean mountFolders, String... env) { pullImageIfNecessary(imageId, false); log.debug("Creating container {}", containerName); CreateContainerCmd createContainerCmd = getClient().createContainerCmd(imageId).withName(containerName).withEnv(env) .withVolumes(new Volume("/var/run/docker.sock")); if (mountFolders) { mountDefaultFolders(createContainerCmd); } createContainerCmd.exec(); log.debug("Container {} started...", containerName); }
containerConfig.withVolumes(vols.toArray(new Volume[vols.size()])); containerConfig.withBinds(binds.toArray(new Bind[binds.size()]));
public void createContainer(String imageId, String containerName, boolean mountFolders, String... env) { pullImageIfNecessary(imageId, false); log.debug("Creating container {}", containerName); CreateContainerCmd createContainerCmd = getClient().createContainerCmd(imageId).withName(containerName).withEnv(env) .withVolumes(new Volume("/var/run/docker.sock")); if (mountFolders) { mountDefaultFolders(createContainerCmd); } createContainerCmd.exec(); log.debug("Container {} started...", containerName); }
"S3_HOSTNAME=" + s3Hostname, "KMS_TURN_URL=" + kmsTurnIp, "KURENTO_GENERATE_RTP_PTS_STATS=" + getKurentoGenerateRtpPtsStats()) .withCmd("--gst-debug-no-color").withVolumes(new Volume("/var/run/docker.sock")); } else { if (kmsDnat && seleniumDnat && RELAY.toString().toUpperCase().equals(seleniumCandidateType) "KMS_STUN_PORT=" + kmsStunPort, "KURENTO_GENERATE_RTP_PTS_STATS=" + getKurentoGenerateRtpPtsStats()) .withCmd("--gst-debug-no-color").withVolumes(new Volume("/var/run/docker.sock")); Paths.get(KurentoTest.getDefaultOutputFolder().toURI()).toAbsolutePath().toString(); Volume volumeTest = new Volume(targetPath); createContainerCmd.withVolumes(volume, volumeTest).withBinds( new Bind(testFilesPath, volume, AccessMode.ro), new Bind(targetPath, volumeTest, AccessMode.rw));
private CreateContainerCmd getBaseCommand() { String hostDir = MesosCluster.getClusterHostDir().getAbsolutePath(); List<Bind> binds = new ArrayList<>(); binds.add(Bind.parse("/var/run/docker.sock:/var/run/docker.sock:rw")); binds.add(Bind.parse("/sys/fs/cgroup:/sys/fs/cgroup")); binds.add(Bind.parse(hostDir + ":" + hostDir)); if (getCluster().getMapAgentSandboxVolume()) { binds.add(Bind.parse(String.format("%s:%s:rw", hostDir + "/.minimesos/sandbox-" + getClusterId() + "/" + hostName, MESOS_AGENT_WORK_DIR + hostName + "/slaves"))); } CreateContainerCmd cmd = DockerClientFactory.build().createContainerCmd(getImageName() + ":" + getImageTag()) .withName(getName()) .withHostName(hostName) .withPrivileged(true) .withVolumes(new Volume(MESOS_AGENT_WORK_DIR + hostName)) .withEnv(newEnvironment() .withValues(getMesosAgentEnvVars()) .withValues(getSharedEnvVars()) .createEnvironment()) .withPidMode("host") .withLinks(new Link(getZooKeeper().getContainerId(), "minimesos-zookeeper")) .withBinds(binds.stream().toArray(Bind[]::new)); MesosDns mesosDns = getCluster().getMesosDns(); if (mesosDns != null) { cmd.withDns(mesosDns.getIpAddress()); } return cmd; }
"S3_HOSTNAME=" + s3Hostname, "KMS_TURN_URL=" + kmsTurnIp, "KURENTO_GENERATE_RTP_PTS_STATS=" + getKurentoGenerateRtpPtsStats()) .withCmd("--gst-debug-no-color").withVolumes(new Volume("/var/run/docker.sock")); } else { if (kmsDnat && seleniumDnat && RELAY.toString().toUpperCase().equals(seleniumCandidateType) "KMS_STUN_PORT=" + kmsStunPort, "KURENTO_GENERATE_RTP_PTS_STATS=" + getKurentoGenerateRtpPtsStats()) .withCmd("--gst-debug-no-color").withVolumes(new Volume("/var/run/docker.sock")); Paths.get(KurentoTest.getDefaultOutputFolder().toURI()).toAbsolutePath().toString(); Volume volumeTest = new Volume(targetPath); createContainerCmd.withVolumes(volume, volumeTest).withBinds( new Bind(testFilesPath, volume, AccessMode.ro), new Bind(targetPath, volumeTest, AccessMode.rw));
if (microservice.getVolumeMappings() != null) { cmd = cmd .withVolumes(volumes.toArray(new Volume[volumes.size()])) .withBinds(volumeBindings.toArray(new Bind[volumeBindings.size()]));
createContainerCmd.withVolumes(toVolumes(containerConfiguration.getVolumes()));
binds.add(bind); }); createContainerCmd.withVolumes(volumes); hostConfig.withBinds(binds);
createContainerCmd.withVolumes(toVolumes(containerConfiguration.getVolumes()));
createContainerCmd.withVolumes(volume);