Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
gesellix committed Jun 20, 2021
1 parent 4316b4d commit a702ab1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.gradle
.idea
*.iml
/build
/classes
build/
classes/
npipe.exe
.DS_Store
out/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class LocalDocker {
log.debug available() ? "connection success" : "failed to connect"
}

static available() {
static boolean available() {
try {
return new DockerClientImpl().ping().status.code == 200
}
Expand All @@ -22,7 +22,7 @@ class LocalDocker {
}
}

static supportsSwarmMode() {
static boolean supportsSwarmMode() {
try {
def version = getDockerVersion()
return (version.major >= 1 && version.minor >= 12) || version.major >= 17
Expand All @@ -33,7 +33,7 @@ class LocalDocker {
}
}

static supportsSecrets() {
static boolean supportsSecrets() {
try {
def version = getDockerVersion()
return (version.major >= 1 && version.minor >= 13) || version.major >= 17
Expand All @@ -44,7 +44,7 @@ class LocalDocker {
}
}

static supportsConfigs() {
static boolean supportsConfigs() {
try {
def version = getDockerVersion()
return version.major >= 17 && version.minor >= 6
Expand All @@ -55,7 +55,7 @@ class LocalDocker {
}
}

static supportsStack() {
static boolean supportsStack() {
try {
def version = getDockerVersion()
return (version.major >= 1 && version.minor >= 13) || version.major >= 17
Expand Down Expand Up @@ -126,17 +126,17 @@ class LocalDocker {
}
}

static isNamedPipe() {
static boolean isNamedPipe() {
def dockerHost = new DockerClientImpl().env.dockerHost
return dockerHost.startsWith("npipe://")
}

static isUnixSocket() {
static boolean isUnixSocket() {
def dockerHost = new DockerClientImpl().env.dockerHost
return dockerHost.startsWith("unix://")
}

static isTcpSocket() {
static boolean isTcpSocket() {
def dockerHost = new DockerClientImpl().env.dockerHost
return dockerHost.startsWith("tcp://") || dockerHost.startsWith("http://") || dockerHost.startsWith("https://")
}
Expand Down

0 comments on commit a702ab1

Please sign in to comment.