Skip to content

Latest commit

 

History

History
106 lines (83 loc) · 5.98 KB

HELP.md

File metadata and controls

106 lines (83 loc) · 5.98 KB

Use the pre-built image for this solution


1. Pull the latest image from Docker Hub

docker pull consumerdataright/mock-data-holder

2. Run the Mock Data Holder container

docker run -d -h mock-data-holder -p 8000:8000 -p 8001:8001 -p 8002:8002 -p 8005:8005 --add-host=host.docker.internal:host-gateway --name mock-data-holder consumerdataright/mock-data-holder docker run -d -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Pa{}w0rd2019" -p 1433:1433 --name sql1 -h sql1 -d mcr.microsoft.com/mssql/server:2019-latest

Please note - This docker compose file utilises the Microsoft SQL Server Image from Docker Hub.
The Microsoft EULA for the Microsoft SQL Server Image must be accepted to continue.
See the Microsoft SQL Server Image on Docker Hub for more information.
Using the above command from a MS Windows command prompt will run the database.

3. Use the docker compose file to run a multi-container mock CDR Ecosystem.

The docker compose file can be used to run multiple containers from the Mock CDR Ecosystem, by starting the docker desktop (if using a non MS Windows environment, you will need to add this route to the network), this will be added to your hosts file and is used for inter container connectivity via your host IP Address, eg C:\Windows\System32\drivers\etc\hosts
###.###.###.### host.docker.internal

MS Docker Desktop

4. Execute the docker compose file, the default configuration is to run all mock solutions and executing the comand below will run all the solutions.

docker-compose up

Please note - This docker compose file utilises the Microsoft SQL Server Image from Docker Hub.
The Microsoft EULA for the Microsoft SQL Server Image must be accepted to continue.
Replace this unset ACCEPT_MSSQL_EULA variable with a Y if you accept the EULA. eg ACCEPT_EULA=Y
See the Microsoft SQL Server Image on Docker Hub for more information.

Containers Running

Should you wish to switch out your own solution, remark the relevant code out of this file.
In this example we will be simulating the switching out of our Mock Data Recipient, we are using the
database connection string Server=host.docker.internal and the endpoints shown below to
connect to the running containers, this will result in the Mock Data Recipient running in MS Visual Studio,
connected to the Mock Register and the Mock Data Holder running in docker.
For details on how to run a Mock solution in MS Visual Studio see help guide


Mock Data Recipient switched out settings

How to build your own image instead of downloading it from docker hub.
navigate to .\mock-data-holder\Source
open a command prompt and execute the following;
docker build -f Dockerfile.container -t mock-data-holder .
docker run -d -h mdh-host -p 8000:8000 -p 8001:8001 -p 8002:8002 -p 8005:8005 --add-host=host.docker.internal:host-gateway --name mock-data-holder mock-data-holder

Please note - By default, the container above will be using a MS SQL database container, using this command from a MS Windows command prompt will run the database,
docker run -d -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Pa{}w0rd2019" -p 1433:1433 --name sql1 -h sql1 -d mcr.microsoft.com/mssql/server:2019-latest
You can connect to the MS SQL database container from MS Sql Server Management Studio (SSMS) using the following settings;
Server type: Database Engine
Server name: localhost
Authentication: SQL Server Authentication
Login: sa
Password: Pa{}w0rd2019

SSMS Login Error

(NB: if the above error occurs whilst trying to connect to the MS SQL container, the SQL Server Service MUST BE STOPPED, you can do this from SQL Server Manager)

5. The running solution

Our switched out Mock Data Recipient solution will now be running.

The Mock Data Recipient solution