You can use Flocker driver within Docker CLI for volume creation and launching Docker
containers.
About this task
This example illustrates creation of a new volume and launching a Docker container with the
new volume. Procedure
- Open a command-line terminal.
- Create a 10 GB volume volume_1 based on storage service
gold by running the following command: docker volume create
--driver=flocker --name volume_1 --opt profile=gold --opt size=10g.
- Launch container container_1 with volume volume_1
mounted in the /data path of the Docker container, using Docker image
ubuntu by running the following command: docker run --volume-driver
flocker -v volume_1:/data --name container_1 -it ubuntu bash.
If the specified volume does not exist, the Flocker driver creates it on the Spectrum Control
Base service defined in the agent.yml file, as
default_service.