Docker container with Agent and Polybase enabled RRS feed

  • Question

  • Hi!

    I'm trying to create an image such that I can start docker container

    with Agent and Polybase enabled. Running on Linux/Fedora for evaluation purpose.

    I did run this command: docker run usrname/mssql

    Results in Error Message:

    SQL Server 2019 will run as non-root by default.

    This container is running as user root.
    To learn more visit
    This is an evaluation version.  There are [153] days left in the evaluation period.
    The SQL Server End-User License Agreement (EULA) must be accepted before SQL
    Server can start. The license terms for this product can be downloaded from

    You can accept the EULA by specifying the --accept-eula command line option,
    setting the ACCEPT_EULA environment variable, or using the mssql-conf tool.

    I made docker build -t usrname/mssql on this Dockerfile:

    ENV PW MyVery$tr0ngPW
    ENV PATH=${PATH}:/opt/mssql/bin:/opt/mssql-tools/bin

    # required labels
    LABEL name="microsoft/mssql-server-linux" vendor="Microsoft" version="15.0" release="1" summary="MS SQL Server" \
          description="MS SQL Server is running on Linux" 

    LABEL url="" \
          run='docker run --name ${NAME} \
            -e ACCEPT_EULA=Y -e SA_PASSWORD={PW} -e 'MSSQL_AGENT_ENABLED=true' \
            -p 1433:1433 \
    -v /user/usrname/db:/var/opt/mssql/data \
    --name sqlpoly_usrname \
            -d  ${IMAGE}'

    #COPY licenses /licenses

    RUN mkdir /xdata &&\
    #chmod -R g=u /var/opt/mssql /etc/passwd &&\
    apt-get update && \
        apt-get install -yq apt-transport-https curl && \
        # Get official Microsoft repository configuration
        curl | apt-key add - && \
        curl | tee /etc/apt/sources.list.d/mssql-server-preview.list && \
        apt-get update && \
        # Install PolyBase will also install SQL Server via dependency mechanism.
        apt-get install -y mssql-server-polybase

    #VOLUME /xdata

    #### Containers should not run as root as a good practice
    #USER 10001
    ## Default SQL Server TCP/Port
    #EXPOSE 1433


    Thanks for your help ;-)



    Monday, September 16, 2019 2:31 PM

All replies