All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bmuschko.gradle.docker.tasks.network.DockerCreateNetwork.groovy Maven / Gradle / Ivy

There is a newer version: 6.7.0
Show newest version
package com.bmuschko.gradle.docker.tasks.network

import com.bmuschko.gradle.docker.tasks.AbstractDockerRemoteApiTask
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input

class DockerCreateNetwork extends AbstractDockerRemoteApiTask {
    @Input
    final Property networkId = project.objects.property(String)

    void runRemoteCommand(final dockerClient) {
        logger.quiet "Creating network '${networkId.get()}'."
        final network = dockerClient.createNetworkCmd().withName(networkId.get()).exec()

        if (nextHandler) {
            nextHandler.execute(network)
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy