O'Reilly logo

Docker and Kubernetes for Java Developers by Jaroslaw Krochmalski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating and removing volumes

The Fabric8 Maven Docker plugin couldn't be a complete solution without the possibility of managing volumes. Indeed, it provides two ways to handle volumes: docker:volume-create and docker:volume-remove. As you probably remember from Chapter 2, Networking and Persistent Storage, Docker uses a plugin-like architecture when handling volumes and their drivers. The fabric8 plugin can be configured to pass a specific volume driver and its parameters to the Docker daemon. Consider the following fragment of the plugin configuration:

<plugin>
    
        <configuration>
    
    
          [...]
    
    
          <volumes>
    
    
            <volume>
    
    
              <name>myVolume</name>
    
    
              <driver>local</driver>
    
    
              <opts>
    
    
                <type>tmpfs</type>
    
    
                <device>tmpfs</device>
    
    
       <o>size=100m,uid=1000</o> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required