Skip to content
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.
/ integration-tests Public archive

Docker container to set up MS SQL Server for integration tests

Notifications You must be signed in to change notification settings

101100/integration-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is now archived

It was most useful before on Windows when using a VM as a Docker host, but now it seems to work better to use WSL2 which allows you to mount a Windows directory for backup transfers.


This docker image provides SQL Server along with a shared path that is accesible via an SMB share to facilitate backup file movement.

Setting it up

To use this image, run it with Docker:

docker run -d --name sqlserver --restart always -p 137-138:137-138/udp -p 139:139 -p 445:445 -p 1433:1433 101100/integration-tests
  • You can pass in other SQL Server configuration environment variables by adding -e flags on the command. For instance, you can use a different edition of SQL server (e.g. “Developer”, “Standard” or “Enterprise”) with the MSSQL_PID flag. All together, this would require adding something like -e "MSSQL_PID=Standard" to the above command.
  • By default, the sa user password and share password are both p@ssw0rd. You can change the password by setting the SA_PASSWORD environment variable.

The share has a path of SqlBackups and is available inside the container at /sqlbackups. If you are using Windows, you can preset the password that windows will use to connect to the share using the net command. If Docker is running in a VM and that VM is available as the hostname docker-vm, then the command would be:

net use \\docker-vm\SqlBackups /user:root p@ssw0rd

Re-creating the image from the GitHub repo

If you chose these steps, you can use your image instead of 101100/integration-tests. Note that below you should replace 101100 with your Docker Hub username.

  1. Clone the repository:

    git clone [email protected]:101100/integration-tests.git
    
  2. Build the container:

    docker build -t integration-tests .
    
  3. (Optional) Log in using docker login, tag the image and push it container to Docker Hub:

    docker tag integration-tests 101100/integration-tests:copy-of-MS-tag
    docker tag integration-tests 101100/integration-tests:latest
    docker push 101100/integration-tests:copy-of-MS-tag
    docker push 101100/integration-tests:latest
    

About

Docker container to set up MS SQL Server for integration tests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published