---
title: Dev/test/staging environments for Azure SQL
description: Instructions for building images and creating database containers based on Azure BACPAC files.
---

 

 

 TECHNICAL DOCS

# Dev/test/staging environments for Azure SQL

Windocks can build images and deploy containers based on production data from Azure SQL.

#### [Prerequisites](https://23302346.hs-sites.com/doc-azure-sql#prereq)

#### [1. Start with the BACPAC file](https://23302346.hs-sites.com/doc-azure-sql#step1)

#### [2. Build the Windocks image](https://23302346.hs-sites.com/doc-azure-sql#step2)

#### [3. Create containers](https://23302346.hs-sites.com/doc-azure-sql#step3)

 

 

## **Prerequisites**

1. Production databases running in Azure SQL
2. Windocks installed on a VM which already has SQL Server. See [this link for Windocks install details](https://23302346.hs-sites.com/getting-started)
3. BACPAC file of the Azure SQL database

[Back to Top ](https://23302346.hs-sites.com/doc-azure-sql#top) [Back to Technical Docs Gallery ](https://23302346.hs-sites.com/resources)

 

 

## 1. Start with the BACPAC file

Download the BACPAC file to storage that can be accessed by the machine running Windocks.

[Back to Top ](https://23302346.hs-sites.com/doc-azure-sql#top) [Back to Technical Docs Gallery ](https://23302346.hs-sites.com/resources)

 

 

## 2. Build the Windocks image

See the sample in windocks\samples\cloneFromBacpac. Build an image with the dockerfile using the command  
**docker build -t yourimagename path\to\directory\containing\dockerfile**  
or by using the web application and selecting **Build**.

[Back to Top ](https://23302346.hs-sites.com/doc-azure-sql#top) [Back to Technical Docs Gallery ](https://23302346.hs-sites.com/resources)

 

 

## 3. Create containers

You may create dev/test/staging environments with cloned production data with Windocks. These environments (containers) are available on ports on the VM instance. You may specify the ports as well.

You can use the Windocks web application to create the dev/test/staging environments with cloned production data from the image built above. More details on the web app are [here](https://23302346.hs-sites.com/doc-webapp)

Alternatively, you can also use the REST API with curl to create and start the container with clone as documented [here](https://23302346.hs-sites.com/rest-api)

[Back to Top ](https://23302346.hs-sites.com/doc-azure-sql#top) [Back to Technical Docs Gallery ](https://23302346.hs-sites.com/resources)

## Extend CI/CD to your data layer

[GET A DEMO ](https://23302346.hs-sites.com/schedule-demo) [TRY FREE ](https://23302346.hs-sites.com/try-free)