Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add check for compatible Docker OS type #1780

Merged
merged 5 commits into from Aug 25, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -199,4 +199,11 @@ protected void ping(DockerClient client, int timeoutInSeconds) {
public String getDockerHostIpAddress() {
return DockerClientConfigUtils.getDockerHostIpAddress(this.config);
}

protected void checkOSTypeForWindows() {
String osType = client.infoCmd().exec().getOsType();
if ("windows".equalsIgnoreCase(osType)) {
throw new InvalidConfigurationException("Windows containers are currently not supported");
}
}
}
Expand Up @@ -34,6 +34,7 @@ public void test() throws InvalidConfigurationException {
} catch (Exception | UnsatisfiedLinkError e) {
throw new InvalidConfigurationException("ping failed", e);
}
checkOSTypeForWindows();
}

@NotNull
Expand Down
Expand Up @@ -18,6 +18,7 @@ protected boolean isApplicable() {
@Override
public void test() throws InvalidConfigurationException {
config = tryConfiguration("tcp://localhost:2375");
checkOSTypeForWindows();
}

@Override
Expand Down