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 https://go.microsoft.com/fwlink/?linkid=2099216.
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
http://go.microsoft.com/fwlink/?LinkId=746388.
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:
FROM mcr.microsoft.com/mssql/server:2019-latestENV 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="https://www.microsoft.com/en-us/sql-server/" \
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 https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-preview.list | 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 ;-)
BR
Bjorn