Docker containers have rapidly become a popular technology in the healthcare industry, providing a number of benefits to healthcare providers, researchers, and patients alike. In this blog post, we will explore some of the key ways in which Docker containers can be used in healthcare and how they can help to improve patient care and outcomes.
Containerisation of Medical Imaging Software, allowing for more efficient and secure sharing of patient data between healthcare providers
One of the primary uses of Docker containers in healthcare is the containerisation of medical imaging software. Medical imaging is a crucial aspect of patient care and diagnosis, but sharing and storing these large and sensitive files can be a challenge. Docker containers provide a secure and efficient way to share and store medical imaging data, ensuring that it is easily accessible to authorised healthcare providers while also maintaining patient privacy. Hence, it allows for more efficient and secure sharing of patient data between healthcare providers.
An example of containerised medical imaging software is DICOM (Digital Imaging and Communications in Medicine) on Docker. Docker is a platform that allows for creating and deploying containers, which are isolated and lightweight environments for running applications. By containerising DICOM, healthcare providers can easily share and access patient imaging data securely and efficiently, without worrying about compatibility issues or potential security breaches.
There are publicly available Dockerfiles and Docker Compose files for DICOM. Here’s an example Dockerfile for setting up a DICOM server using dcm4che, an open-source DICOM server:
FROM eclipse-temurin:11
RUN apt update -y && apt install -y wget unzip
RUN wget -q https://sourceforge.net/projects/dcm4che/files/dcm4chee-arc-light5/5.20.0/dcm4chee-arc-5.20.0-mysql.zip && \
unzip dcm4chee-arc-5.20.0-mysql.zip && \
rm dcm4chee-arc-5.20.0-mysql.zip && \
mv dcm4chee-arc-5.20.0-mysql dcm4chee
EXPOSE 8080 11112
CMD ["/dcm4chee/bin/run.sh"]
Here’s an example Docker Compose file to run a DICOM server along with a MySQL database:
version: '3'
services:
dcm4chee:
build: .
ports:
- 8080:8080
- 11112:11112
db:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: dcm4chee
The Medical Imaging Server for DICOM is an open source DICOM server that is easily deployed. It allows standards-based communication with any DICOMweb™ enabled systems, and injects DICOM metadata into a FHIR server to create a holistic view of patient data. FHIR is becoming an important standard for clinical data and provides extensibility to support integration of other types of data directly, or through references. By using the Medical Imaging Server for DICOM, organizations can store references to imaging data in FHIR and enable queries across clinical and imaging datasets.
version: "3.8"
services:
dicomserver:
build:
context: ./..
dockerfile: src/Microsoft.Health.Dicom.Web/Dockerfile
args:
BUILD_CONFIGURATION: Release
CONTINUOUS_INTEGRATION_BUILD: ${ContinuousIntegrationBuild:-false}
platform: linux/amd64
environment:
AzureWebJobsStorage: "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite:10000/devstoreaccount1;QueueEndpoint=http://azurite:10001/devstoreaccount1;TableEndpoint=http://azurite:10002/devstoreaccount1;"
ASPNETCORE_ENVIRONMENT: "Development"
ASPNETCORE_URLS: "http://+:8080"
BlobStore__ConnectionString: "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite:10000/devstoreaccount1;"
DicomFunctions__DurableTask__ConnectionName: "AzureWebJobsStorage"
DicomFunctions__Indexing__Batching__MaxParallelCount: "1"
SqlServer__AllowDatabaseCreation: "true"
SqlServer__ConnectionString: "Server=tcp:sql,1433;Initial Catalog=Dicom;Persist Security Info=False;User ID=sa;Password=${SAPASSWORD:-L0ca1P@ssw0rd};MultipleActiveResultSets=False;Connection Timeout=30;TrustServerCertificate=true"
SqlServer__Initialize: "true"
ports:
- "8080:8080"
restart: on-failure
depends_on:
- functions
- azurite
- sql
functions:
build:
# While Container Tools are said to support Azure Functions, it does not appear that
# Docker Compose projects support them. So for now the Dockerfile is kept in a folder separate from the project file
context: ./..
dockerfile: src/Microsoft.Health.Dicom.Functions.App/Docker/Dockerfile
args:
BUILD_CONFIGURATION: Release
CONTINUOUS_INTEGRATION_BUILD: ${ContinuousIntegrationBuild:-false}
platform: linux/amd64
environment:
AzureFunctionsJobHost__BlobStore__ConnectionString: "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite:10000/devstoreaccount1;"
AzureFunctionsJobHost__Logging__Console__IsEnabled: "true"
AzureFunctionsJobHost__SqlServer__ConnectionString: "Server=tcp:sql,1433;Initial Catalog=Dicom;Persist Security Info=False;User ID=sa;Password=${SAPASSWORD:-L0ca1P@ssw0rd};MultipleActiveResultSets=False;Connection Timeout=30;TrustServerCertificate=true"
AzureWebJobsStorage: "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite:10000/devstoreaccount1;QueueEndpoint=http://azurite:10001/devstoreaccount1;TableEndpoint=http://azurite:10002/devstoreaccount1;"
AZURE_FUNCTIONS_ENVIRONMENT: "Development"
WEBSITE_HOSTNAME: "localhost:8080"
APPINSIGHTS_INSTRUMENTATIONKEY: "00000000-0000-0000-0000-000000000000" # required to configure telemetry client even when running locally
ports:
- "7072:8080"
restart: on-failure
depends_on:
- azurite
azurite:
# See here for tags: https://mcr.microsoft.com/en-us/product/azure-storage/azurite/tags
image: mcr.microsoft.com/azure-storage/azurite:latest
# # These port bindings [source]:[dest] can be uncommented to connect to the storage emulator via Microsoft Azure Storage Explorer
# # Note that the source ports may need to change if a storage emulator is already running on localhost
# ports:
# - "10001:10001"
# - "10000:10000"
# - "10002:10002"
sql:
build:
context: ./..
dockerfile: docker/sql/Dockerfile
environment:
SA_PASSWORD: ${SAPASSWORD:-L0ca1P@ssw0rd}
ACCEPT_EULA: "Y"
healthcheck:
test: ["CMD", "/opt/mssql-tools/bin/sqlcmd", "-U", "sa", "-P", "${SAPASSWORD:-L0ca1P@ssw0rd}", "-Q", "SELECT * FROM INFORMATION_SCHEMA.TABLES"]
interval: 10s
timeout: 10s
retries: 6
start_period: 15s
# # These port bindings [source]:[dest] can be uncommented to connect to SQL Server via Microsoft SQL Management Studio
# ports:
# - "1433:1433"
Run the following command from the root of the microsoft/dicom-server
repository, replacing <SA_PASSWORD>
with your chosen password.
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/
.
Deployment of Electronic Health Record (EHR) systems in a scalable and secure manner
Another key use of Docker containers in healthcare is the deployment of electronic health record (EHR) systems. EHRs are essential for the modern healthcare system, but they can be difficult to deploy and maintain. Docker containers provide a scalable and secure way to deploy and run EHR systems, making it easier for healthcare providers to access and share patient data.
Electronic Health Record (EHR) systems can be deployed using Docker containers and orchestrated using Docker Compose. Here’s an example Dockerfile to deploy an EHR system:
FROM php:7.3-apache
RUN apt-get update && apt-get install -y \
libssl-dev \
libcurl4-openssl-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
zlib1g-dev
RUN docker-php-ext-install pdo_mysql mysqli mbstring gd
COPY . /var/www/html/
Here’s an example Docker Compose file to run the EHR system along with a MySQL database:
version: '3'
services:
ehr:
build: .
ports:
- 80:80
db:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: ehr
With these Dockerfiles and Docker Compose files, the EHR system can be easily deployed and scaled in a secure and efficient manner.
Creation of Portable and Reproducible Research Environments for Data analysis and Machine Learning in Healthcare
Docker containers can also be useful in the research side of healthcare. They provide a way to create portable and reproducible research environments for data analysis and machine learning. This allows researchers to easily share their data and methods with others and reproduce their results, which is essential for verifying and building on previous research. Additionally, by using containers, researchers can avoid the risk of dependency issues or version conflicts that might arise when working with multiple libraries or tools.
Research environments for data analysis and machine learning in healthcare can be created using Docker containers. Here’s an example Dockerfile to set up a Jupyter notebook environment with TensorFlow and the scikit-learn library for machine learning:
FROM jupyter/tensorflow-notebook
RUN pip install scikit-learn
Here’s an example Docker Compose file to run the Jupyter notebook environment:
version: '3'
services:
jupyter:
build: .
ports:
- 8888:8888
With these Dockerfiles and Docker Compose files, researchers can easily create portable and reproducible research environments for data analysis and machine learning in healthcare.
Isolation of sensitive patient data in compliance with regulations such as HIPAA
Another important use of Docker containers in healthcare is the isolation of sensitive patient data. Healthcare providers are subject to strict regulations such as HIPAA which govern the handling of patient data. Docker containers provide a way to isolate and protect sensitive patient data, ensuring that it is only accessible to authorised individuals and that it is in compliance with regulations.
Sensitive patient data can be isolated and protected in compliance with regulations such as HIPAA using Docker containers. However, creating a Dockerfile and Docker Compose file alone is not sufficient to ensure HIPAA compliance. Proper security measures such as encryption, secure data transmission, and access control must also be implemented.
Here’s an example Dockerfile to set up a secure PHP web application for storing sensitive patient data:
FROM php:7.3-apache
RUN apt-get update && apt-get install -y \
libssl-dev \
libcurl4-openssl-dev \
&& docker-php-ext-install pdo_mysql mysqli mbstring
COPY . /var/www/html/
RUN chown -R www-data:www-data /var/www/html/ && \
chmod 700 /var/www/html/
Here’s an example Docker Compose file to run the PHP web application along with a MySQL database:
version: '3'
services:
web:
build: .
ports:
- 80:80
db:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: web
It is important to note that while the above example demonstrates a basic setup for a secure web application, it is not intended to provide a comprehensive solution for HIPAA compliance and additional security measures may be necessary.
Development and deployment of telemedicine applications, allowing for remote consultation and treatment of patients
Docker containers can also be used in the development and deployment of telemedicine applications. Telemedicine allows for remote consultation and treatment of patients, which is especially useful in the context of the COVID-19 pandemic. By using Docker containers, healthcare providers can quickly and easily deploy telemedicine applications, allowing patients to receive care from the comfort of their own homes.
Telemedicine applications can be developed and deployed using Docker containers. Here’s an example Dockerfile to set up a Node.js based telemedicine application:
FROM node:14
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD [ "npm", "start" ]
Here’s an example Docker Compose file to run the telemedicine application along with a MongoDB database:
version: '3'
services:
telemedicine:
build: .
ports:
- 3000:3000
db:
image: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
MONGO_INITDB_DATABASE: telemedicine
With these Dockerfiles and Docker Compose files, telemedicine applications can be easily developed, tested, and deployed, allowing for remote consultation and treatment of patients.
In conclusion, Docker containers are a powerful technology that can be used in a variety of ways in the healthcare industry. From containerising medical imaging software to deploying EHR systems, from reproducible research to isolation of sensitive patient data and telemedicine, Docker containers provide a range of benefits to healthcare providers, researchers, and patients alike. By using Docker containers, healthcare providers can improve patient care and outcomes while also ensuring compliance with regulations and protecting patient privacy.