コード例 #1
0
 private Map<String, String> resolveSystemEnvironmentVariables(Map<String, String> config) {
   if (!config.containsKey(CubeDockerConfiguration.DOCKER_URI) && isDockerHostSet()) {
     String dockerHostUri =
         SystemEnvironmentVariables.getEnvironmentOrPropertyVariable(DOCKER_HOST);
     config.put(CubeDockerConfiguration.DOCKER_URI, dockerHostUri);
   }
   if (!config.containsKey(CubeDockerConfiguration.CERT_PATH) && isDockerCertPathSet()) {
     String dockerCertPath =
         SystemEnvironmentVariables.getEnvironmentOrPropertyVariable(DOCKER_CERT_PATH);
     config.put(CubeDockerConfiguration.CERT_PATH, dockerCertPath);
   }
   if (!config.containsKey(CubeDockerConfiguration.DOCKER_MACHINE_NAME)
       && isDockerMachineNameSet()) {
     String dockerMachineName =
         SystemEnvironmentVariables.getEnvironmentOrPropertyVariable(DOCKER_MACHINE_NAME);
     config.put(CubeDockerConfiguration.DOCKER_MACHINE_NAME, dockerMachineName);
   }
   return config;
 }
コード例 #2
0
 private boolean isDockerMachineNameSet() {
   return SystemEnvironmentVariables.getEnvironmentOrPropertyVariable(DOCKER_MACHINE_NAME) != null;
 }
コード例 #3
0
 private boolean isDockerCertPathSet() {
   return SystemEnvironmentVariables.getEnvironmentOrPropertyVariable(DOCKER_CERT_PATH) != null;
 }
コード例 #4
0
 private boolean isDockerHostSet() {
   return SystemEnvironmentVariables.getEnvironmentOrPropertyVariable(DOCKER_HOST) != null;
 }