Skip to main content
Version: v22.0

Build the DxEMSSQL Container Image Using Docker


DH2i provides a customized DxEnterprise package that is tailored specifically for container deployments. This quick start guide describes how to build a DxEnterprise + SQL Server container image using a pre-made Dockerfile.


  • A Linux machine with Docker already installed. View Docker documentation for installation instructions.
  • An available repository on Docker Hub.
  • An internet connection for downloading the DxEnterprise container tarball.

Create the SQL Server and DxEnterprise Combined Container Image

First you will create a custom Docker image that combines the SQL Server container image from Docker Hub with a customized DxEnterprise package meant specifically for containers.

  1. Copy the contents of the Dockerfile below to a file your current working directory.


    This image is built from the image on Docker Hub. This image:

    1. Installs .NET Runtime 6.0 and net-tools. net-tools is not required for the container to run, but it may help with diagnosing network issues.

    2. Copies the latest DxEnterprise tarball from, unpacks it, and creates the necessary user permissions.

    3. Assigns the default user as mssql and sets the entrypoint to a pre-defined script. Please note that additional modifications to this script are not supported by DH2i.

    USER root
    #Install dotnet and net-tools
    RUN apt-get update \
    && ACCEPT_EULA=Y apt-get upgrade -y \
    && apt-get install -y wget \
    && wget --no-dns-cache -O packages-microsoft-prod.deb \
    && dpkg -i packages-microsoft-prod.deb \
    && apt-get update \
    && apt-get install -y dotnet-runtime-6.0 net-tools \
    && dpkg --purge packages-microsoft-prod \
    && apt-get purge -y wget \
    && apt-get clean \
    && rm packages-microsoft-prod.deb \
    && rm -rf /var/lib/apt/lists/*
    #Download and unpack DxE, setup permissions
    ADD ./dxe.tgz
    RUN tar zxvf dxe.tgz && rm dxe.tgz \
    && chown -R mssql /var/opt/mssql \
    && chmod -R 777 /opt/dh2i /etc/dh2i
    #Finish setup
    EXPOSE 7979
    USER mssql
    ENTRYPOINT ["/opt/dh2i/sbin/"]
  2. Replace the <repository_name> variable in the command below the name of your registry, repository, and tag (i.e., dh2i/dxemssql:mytest), and run the command.

    sudo docker build -t <repository_name> -f dxemssql.dockerfile ./

Push the Image to a Repository

Pushing the image to a repository allows you to access the image from locations other than that of the machine it was built on. This step is necessary for deployments in Kubernetes or other cloud platforms.

  1. Login to your Docker account on the local machine using sudo docker login.

  2. Push the image to Docker Hub using the command below, replacing <repository_name> with the tag you used in step 2 of the previous section.

    sudo docker push <repository_name>

Next Steps

Once the image is uploaded to Docker Hub, you can deploy the image in your environment. DH2i has documentation that describes how to use the DxEMSSQL image in various deployments:

Additional Information