I've taken note of various Dockerfiles for SQL Server support, most recently: https://blogs.msdn.microsoft.com/sqlserverstorageengine/2016/03/21/sql-server-in-windows-containers/
And, I've seen the SQL Server Image support provided by WinDocks on Windows Server 2012 but I haven't seen whether Microsoft has announced plans to support SQL Server 2016 with Docker image support on Windows Server 2016? And, if so, has anyone heard if MS plans to include support in dockerfile support for adding or mounting databases in containers? Thanks in advance!
Follow up on this, Microsoft released Windows Server core 1709 with support for network attached SMB shares. I also note that Windocks has released Docker SQL Server container database cloning support, which I've tested using Core 1709,and can now service a team with 500 GB data images in roughly 1 minute. You can see more on Windocks at https://windocks.com/docker-sql-server-containers
UPDATE : The SQL Server team now maintains a 2014 Express image on Docker Hub: https://hub.docker.com/r/microsoft/mssql-server-2014-express-windows/
SQL Server 2016 is currently a little harder to install, but 2014 works fine. Here's my (slightly hacky) Dockerfile:
FROM microsoft/dotnet35
ENV SQL_EXPRESS_DOWNLOAD_URL "https://download.microsoft.com/download/1/5/6/156992E6-F7C7-4E55-833D-249BD2348138/ENU/x64/SQLEXPR_x64_ENU.exe"
ENV SQL_SERVER_SA_PASSWORD "Password1"
WORKDIR /
RUN powershell -Command (New-Object System.Net.WebClient).DownloadFile('%SQL_EXPRESS_DOWNLOAD_URL%', 'sqlexpress.exe')
RUN /sqlexpress.exe /qs /x:setup && /setup/setup.exe /q /ACTION=Install /INSTANCENAME=SQLEXPRESS /FEATURES=SQLEngine /UPDATEENABLED=0 /SECURITYMODE=SQL /SAPWD=%SQL_SERVER_SA_PASSWORD% /SQLSVCACCOUNT="NT AUTHORITY\System" /SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS" /TCPENABLED=1 /NPENABLED=0 /IACCEPTSQLSERVERLICENSETERMS && del /F /Q sqlexpress.exe && rd /q /s setup
RUN powershell -Command \
set-strictmode -version latest ; \
stop-service MSSQL`$SQLEXPRESS ; \
set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql12.SQLEXPRESS\mssqlserver\supersocketnetlib\tcp\ipall' -name tcpdynamicports -value '' ; \
set-itemproperty -path 'HKLM:\software\microsoft\microsoft sql server\mssql12.SQLEXPRESS\mssqlserver\supersocketnetlib\tcp\ipall' -name tcpport -value 1433 ; \
start-service MSSQL`$SQLEXPRESS
CMD powershell -Command while ($true) { Start-Sleep -Seconds 3600 }
EXPOSE 1433
It's based on this one: https://github.com/brogersyh/Dockerfiles-for-windows/blob/master/sqlexpress/dockerfile
如果你想安装一个完整版本的sql server(不仅仅是Express版本),你可以这样做: https : //github.com/mabead/Docker.SqlServer
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.