2

I'm hoping to be able to use features like publisher replication within the developer sku for SQL Server 2016. I have unsuccessfully adapted a dockerfile for it from the official docker repo from Microsoft, the text is from an old checkin where the developer sku was used before it was transitioned to the express sku. The SQLServer2016-dev-x64-ENU.exe file mentioned was one I downloaded manually through the portal to obtain SQL Server 2016 developer edition.

The referenced powershell script can be found here: Git hub for microsoft docker and mssqlserver

mssql server 2016 developer image

FROM microsoft/windowsservercore

# maintainer for image metadata
MAINTAINER Alex Narayan


ENV sa_password _
ENV attach_dbs "[]"

# make install files accessible
COPY . /
WORKDIR /


RUN powershell ./SQLServer2016-DEV-x64-ENU.exe /qs /x:setup 
RUN powershell ./setup/SETUP.exe /qs /ACTION=Install /FEATURES=SQLEngine,Replication /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="NT Service\SQLDEV" /SQLSVCPASSWORD="Th1sStr0ngPasswd" /SQLSYSADMINACCOUNTS="BUILTIN\Administrators" /AGTSVCACCOUNT="NT AUTHORITY\Network Service" /TCPENABLED=1 /IACCEPTSQLSERVERLICENSETERMS                         
RUN powershell del /F /Q SQLServer2016-DEV-x64-ENU.exe 
RUN powershell del /F /Q SQLServer2016-DEV-x64-ENU.box 
RUN powershell rd /q /s setup

RUN powershell -Command \
        set-strictmode -version latest ; \
        stop-service MSSQL`$MSSQLSERVER ; \
        set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql13.MSSQLSERVER\mssqlserver\supersocketnetlib\tcp\ipall' -name tcpdynamicports -value '' ; \
        set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql13.MSSQLSERVER\mssqlserver\supersocketnetlib\tcp\ipall' -name tcpport -value 1433 ; \
        set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql13.MSSQLSERVER\mssqlserver\' -name LoginMode -value 2 ;

CMD powershell ./start -sa_password %sa_password% -attach_dbs \"%attach_dbs%\" -Verbose

I've added 'Replication' to the vnext dockerfile and url's for the data:

# mssql server 2016 vNext  image
FROM microsoft/windowsservercore

# maintainer for image metadata
MAINTAINER Perry Skountrianos

# set environment variables
ENV sql_vnext_download_url "http://care.dlservice.microsoft.com/dl/download/A/9/F/A9F911CC-A0D3-4F35-9D80-4F5C7F6886D1/ENU/SQLServervNext-x64-ENU.exe"
ENV sql_box "http://care.dlservice.microsoft.com/dl/download/A/9/F/A9F911CC-A0D3-4F35-9D80-4F5C7F6886D1/ENU/SQLServervNext-x64-ENU.box"


ENV sa_password _
ENV attach_dbs "[]"
ENV ACCEPT_EULA _

# make install files accessible
COPY . /
WORKDIR /

# download and install Microsoft SQL Server vNext in one step
RUN powershell -Command (New-Object System.Net.WebClient).DownloadFile('%sql_box%', 'SQLServervNext-x64-ENU.box')
RUN powershell -Command (New-Object System.Net.WebClient).DownloadFile('%sql_vnext_download_url%', 'sqlvnext.exe') && /sqlvnext.exe /qs /x:setup && /setup/setup.exe /q /ACTION=Install /INSTANCENAME=SQL /FEATURES=SQLEngine,Replication /UPDATEENABLED=0 /SQLSVCACCOUNT="NT AUTHORITY\System" /SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS" /TCPENABLED=1 /NPENABLED=0 /IACCEPTSQLSERVERLICENSETERMS && del /F /Q sqlvnext.exe && rd /q /s setup


RUN powershell -Command \
        set-strictmode -version latest ; \
        stop-service MSSQL`$SQL ; \
        set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql14.SQL\mssqlserver\supersocketnetlib\tcp\ipall' -name tcpdynamicports -value '' ; \
        set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql14.SQL\mssqlserver\supersocketnetlib\tcp\ipall' -name tcpport -value 1433 ; \
        set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql14.SQL\mssqlserver\' -name LoginMode -value 2 ;

CMD powershell ./start -sa_password %sa_password% -ACCEPT_EULA %ACCEPT_EULA% -attach_dbs \"%attach_dbs%\" -Verbose

The difference here is that this vnext dockerfile actually builds. I am now running into an issue where when I go to setup replication it complains about needing "the actual server name to make a connection".

0 Answers0