Hello Wangsa,
Running the Self-Hosted Integration Runtime (SHIR) in a Windows container is possible, and it can be a more efficient approach compared to running it on a Windows VM. The process involves creating a Docker container that hosts the SHIR service. Here's a general outline of the steps you need to follow:
- Install Docker Desktop for Windows with Windows container support. If you're using a Windows Server, you can install the Docker Engine - Enterprise directly on the server.
- Create a new directory for your Docker project, and within that directory, create a new file named
Dockerfile
with the following content:
# Use the Windows Server Core image as the base image
FROM mcr.microsoft.com/windows/servercore:ltsc2019
# Download and install the Self-Hosted Integration Runtime
ADD https://go.microsoft.com/fwlink/?linkid=2178493 "C:\shir\IntegrationRuntime.msi"
RUN msiexec /i "C:\shir\IntegrationRuntime.msi" /qn /norestart
# Set the working directory
WORKDIR C:/Program Files/Microsoft Integration Runtime/4.0/bin
# Expose the required ports
EXPOSE 8060 3389
# Run the SHIR service
CMD ["Microsoft.Cloud.DataMovement.DataTransferApp.exe"]
- Open a command prompt or PowerShell window, navigate to the directory containing the
Dockerfile
, and run the following command to build the Docker image:
docker build -t shir:latest .
- After the image is built, run a new container with the following command, replacing
<NodeName>
and<AuthKey>
with the appropriate values from your Azure Data Factory or Synapse workspace:
docker run -d -p 8060:8060 -p 3389:3389 --name shir-container shir:latest -register -nodeName <NodeName> -authkey <AuthKey>
- The SHIR container should now be running, and it will register with your Azure Data Factory or Synapse workspace.
Keep in mind that running SHIR in a Windows container is still subject to Windows licensing costs. If you want to reduce costs further, you can consider using the SHIR on a Linux container instead, following a similar approach.
For a more detailed explanation and a step-by-step guide, refer to the official documentation: How to run the self-hosted integration runtime in a Windows container