15. Extending Docker with Plugins
Activity 15.01: Installing WordPress with Network and Volume Plugins
Solution:
It is possible to create containers for the database and the WordPress blog using volume and networking plugins with the following steps:
- Create a network with the following command:
docker network create \ --driver=store/weaveworks/net-plugin:2.5.2 \ --attachable \ wp-network
This command creates a network using the Weave Net plugin, specified with the
driver
flag. In addition, the volume is specified asattachable
, which means you can connect to Docker containers in the future. Finally, the name of the container will bewp-network
. You should get output like the following:mk0pmhpb2gx3f6s00o57j2vd
- Create a volume with the following command:
docker volume create -d vieux/sshfs \ --name wp-content \ -o sshcmd=root@localhost:/tmp \ -o password=root \ -o port=2222
This command creates a volume over SSH using the
vieux/sshfs
plugin. The name of the volume iswp...