Music Store—store data using SQL Server container
In the earlier section, we upgraded Music Store to store binary data using volumes. In this section we will build a musicstore
image which will use SQL Server 2016 Express container to store data. The completed sample for Music Store is available under the GitHub repository: C:/learningwsc/chapter6/musicstore-sqlserver
.
The following are the updates done to the Music Store application to enable data storage:
DockerTask.ps1
: In the earlier section, we used volumes to create images, the following changes are made to theDockerTask.ps1
to create and use volume as part of the build and run process:
#Create Docker Volume docker volume create musicstoreimages #Creates a Music Store Container docker run -v d:\temp\uploads -p $HostPort`:$ContainerPort -v c:\programdata\docker\volumes\musicstoreimages: c:\app\wwwroot\Images\albums $ImageName`: $Version dotnet musicstore.dll
Config...