Search in sources :

Example 1 with VolumeBindingUtil.resolveRelativeVolumeBindings

use of io.fabric8.maven.docker.util.VolumeBindingUtil.resolveRelativeVolumeBindings in project docker-maven-plugin by fabric8io.

the class DockerComposeServiceWrapper method getVolumeConfig.

RunVolumeConfiguration getVolumeConfig() {
    RunVolumeConfiguration.Builder builder = new RunVolumeConfiguration.Builder();
    List<String> volumes = asList("volumes");
    boolean added = false;
    if (volumes.size() > 0) {
        builder.bind(volumes);
        added = true;
    }
    List<String> volumesFrom = asList("volumes_from");
    if (volumesFrom.size() > 0) {
        builder.from(volumesFrom);
        added = true;
    }
    if (added) {
        RunVolumeConfiguration configuration = builder.build();
        VolumeBindingUtil.resolveRelativeVolumeBindings(baseDir, configuration);
        return configuration;
    }
    return null;
}
Also used : RunVolumeConfiguration(io.fabric8.maven.docker.config.RunVolumeConfiguration)

Aggregations

RunVolumeConfiguration (io.fabric8.maven.docker.config.RunVolumeConfiguration)1