Skip to content

Commit

Permalink
:fabric8io#759: Fix skipDockerMachine
Browse files Browse the repository at this point in the history
Fix skipDockerMachine when a docker machine configuration is provided.

Fixes fabric8io#759
  • Loading branch information
rhuss committed May 17, 2017
1 parent 7c2cf7e commit 9dee433
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,16 @@ private List<DockerConnectionDetector.DockerHostProvider> getDockerHostProviders
* @return list of providers or <code>null</code> if none are applicable
*/
private List<DockerConnectionDetector.DockerHostProvider> getDefaultDockerHostProviders(DockerAccessContext dockerAccessContext, Logger log) {

DockerMachineConfiguration config = dockerAccessContext.getMachine();
if (config == null) {
if (dockerAccessContext.isSkipMachine()) {
config = null;
} else if (config == null) {
Properties projectProps = dockerAccessContext.getProjectProperties();
if (!dockerAccessContext.isSkipMachine()) {
if (projectProps.containsKey(DockerMachineConfiguration.DOCKER_MACHINE_NAME_PROP)) {
config = new DockerMachineConfiguration(
projectProps.getProperty(DockerMachineConfiguration.DOCKER_MACHINE_NAME_PROP),
projectProps.getProperty(DockerMachineConfiguration.DOCKER_MACHINE_AUTO_CREATE_PROP));
}
if (projectProps.containsKey(DockerMachineConfiguration.DOCKER_MACHINE_NAME_PROP)) {
config = new DockerMachineConfiguration(
projectProps.getProperty(DockerMachineConfiguration.DOCKER_MACHINE_NAME_PROP),
projectProps.getProperty(DockerMachineConfiguration.DOCKER_MACHINE_AUTO_CREATE_PROP));
}
}

Expand Down

0 comments on commit 9dee433

Please sign in to comment.