Mounting Azure Files SMB share in a container

In order to mount the new Azure Files SMB share as a bind mount in a container, we will leverage the SMB Global Mapping feature that was introduced in Window Server 1709. Global mappings have been introduced specifically for this purpose, that is, mounting SMB shares on the host so that they're visible to containers. Let's get started:

  1. First, ensure that you are logged in so that you can execute Azure PowerShell (using the Connect-AzAccount command).
  2. Next, let's define a few variables that will be used in the commands we'll execute soon:
$resourceGroupName = "docker-storage-resource-group"$storageAccountName = "dockerstorageaccount"$fileShareName = "docker-bind-mount-share"

The names being used ...

Get Hands-On Kubernetes on Windows now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.