This quickstart guide details how to build and run the Medical Imaging Server for DICOM in Docker. By using Docker Compose, all of the necessary dependencies are started automatically in containers without requiring any installations on your development machine. In particular, the Medical Imaging Server for DICOM in Docker starts a container for SQL Server and the Azure Storage emulator called Azurite.
IMPORTANT
This sample has been created to enable Development/Test scenarios and is not suitable for production scenarios. Passwords are contained in deployment files, the SQL server connection is not encrypted, authentication on the Medical Imaging Server for DICOM has been disabled, and data is not persisted between container restarts.
You can easily run and debug the Medical Imaging Server for DICOM right from Visual Studio. Simply open up the solution file Microsoft.Health.Dicom.sln in Visual Studio 2019 (or later) and run the "docker-compose" project. This should build each of the images and run the containers locally without any additional action.
Once it's ready, a web page should open automatically for the URL https://localhost:8080
where you can communicate with the Medical Imaging Server for DICOM.
Run the following command from the root of the microsoft/dicom-server
repository, replacing <SA_PASSWORD>
with your chosen password (be sure to follow the SQL Server password complexity requirements):
docker-compose -p healthcare -f docker/docker-compose.yml up --build -d
If you wish to specify your own SQL admin password, you can include one as well:
env SAPASSWORD='<SA_PASSWORD>' docker-compose -p healthcare -f docker/docker-compose.yml up --build -d
Once deployed the Medical Imaging Server for DICOM should be available at http://localhost:8080/
.
If you also want to include DICOMcast, simply add one more file to the docker-compose up
command:
docker-compose -p healthcare -f docker/docker-compose.yml -f docker/docker-compose.cast.yml up --build -d
To build the dicom-server
image run the following command from the root of the microsoft/dicom-server
repository:
docker build -f src/microsoft.health.dicom.web/Dockerfile -t dicom-server .
When running the container, additional configuration details can also be specified such as:
docker run -d \
-e DicomServer__Security__Enabled="false" \
-e SqlServer__ConnectionString="Server=tcp:<sql-server-fqdn>,1433;Initial Catalog=Dicom;Persist Security Info=False;User ID=sa;Password=<sql-sa-password>;MultipleActiveResultSets=False;Connection Timeout=30;TrustServerCertificate=true" \
-e SqlServer__AllowDatabaseCreation="true" \
-e SqlServer__Initialize="true" \
-e BlobStore__ConnectionString="<blob-connection-string>" \
-p 8080:8080 \
dicom-server
By default, the storage services like azurite
and sql
are not exposed locally, but you may connect to them directly by uncommenting the ports
element in the docker-compose.yml
file. Be sure those ports aren't already in-use locally! Without changing the values, the following ports are used:
- SQL Server exposes a TCP connection on port
1433
- In a SQL connection string, use
localhost:1433
or eventcp:(local)
- In a SQL connection string, use
- Azurite, the Azure Storage Emulator, exposes the blob service on port
10000
, the queue service on port10001
, and the table service on port10002
- The emulator uses a well-defined connection string
- Use Azure Storage Explorer to browse its contents
- FHIR can be accessible via
http://localhost:8081
You can also connect to them via their IP address rather rather than via localhost. The following command will help you understand the IPs and ports by which the services are exposed:
docker inspect -f 'Name: {{.Name}} - IPs: {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} - Ports: {{.Config.ExposedPorts}}' $(docker ps -aq)
Once deployment is complete you can access your Medical Imaging Server at https://localhost:8080
. Make sure to specify the version as part of the url when making requests. More information can be found in the Api Versioning Documentation