In a recent TechRepublic video, Jack Wallen showed how to create and use a Docker CIFS volume with the Portainer web-based GUI. The following is an edited transcript of his tutorial.
First off, you’ll need to have a CIFS share to connect to on either the machine hosting Docker or another machine on your network.
Log into Portainer, select the Docker environment and click Volumes from the left navigation. Click Add Volume in the top right corner. Give the volume a name, and click the On/Off slider for Use CIFS Volume until it’s in the on position.
Type the address for the machine hosting the CIFS share. Type the share name. Select CIFS V3. Add a username who has access to the share, type that user’s password, and click Create the volume.
To use the volume, click Containers in the left navigation, and in the resulting window, click Add Container. Give the container a name. Type the image to be used for the container.
Scroll down to the Advanced Container Setting section. Click volumes. Click Map Additional Volume. Type the path within the container, such as /data/db. Select the newly created volume from the volume dropdown, and then, click Deploy the Container.
For more tutorials from Jack Wallen, subscribe to TechRepublic’s YouTube channel How To Make Tech Work — and remember to like this video.
If you are interested in learning more about Docker, you can check out the following resources in TechRepublic Academy:
Hacking and Securing Docker Containers
Linux and Docker Coding Bundle
Docker and Kubernetes mini-bundle