[68] Microsoft SQL Server 2014 on Docker

Check my previous posts ([17] Microsoft SQL Server 2012 on Docker & [27] Reducing the size of Docker Layers (Windows)) for some more context.

I had to do a similar activity for MSSQL Server 2014 at work today. So, I created a similar Dockerfile for MSSQL Server 2014 and built and pushed it to Docker Hub here. This covers both the topics from the above two posts (17 & 27).

Dockerfile

# Microsoft SQL Server 2014 - 12.0.2000.8 (X64)   Feb 20 2014 20:04:26   Copyright (c) Microsoft Corporation  Express Edition (64-bit) on Windows NT 6.3 <X64> (Build 14393: ) (Hypervisor) 

FROM mcr.microsoft.com/dotnet/framework/runtime:3.5-windowsservercore-ltsc2016
 
RUN PowerShell (New-Object net.webclient).Downloadfile(\"http://storage-server:8000/sql_server_2014.zip\", \"C:\sql_server_2014.zip\") && \
PowerShell Expand-Archive -Force C:\sql_server_2014.zip C:\sql_server_2014 && \
del C:\sql_server_2014.zip && \
C:/sql_server_2014/setup.exe /ACTION=install /Q /INSTANCENAME="MSSQLSERVER" /SQLSVCACCOUNT="NT Authority\System" /AGTSVCACCOUNT="NT AUTHORITY\Network Service" /IACCEPTSQLSERVERLICENSETERMS=1 /FEATURES=SQLENGINE /SQLSYSADMINACCOUNTS="BUILTIN\Administrators" /SECURITYMODE=SQL /SAPWD="Passw0rd" /TCPENABLED=1 /SQLSVCSTARTUPTYPE="Automatic" || exit 0 && \
rmdir /S /Q "C:/sql_server_2014/" && \
exit 0
 
EXPOSE 1433

Please note that the URL from where you download the ZIP must be configured correctly.

Docker Hub URL

https://hub.docker.com/layers/anushibin007/mssqldb/2014-express/images/sha256-d23d23e92bf5e021608e57c4cdcf68cf29ee6d682c904bd6c24090180589cc98?context=explore

Build Command

docker build --squash --memory 8G -t anushibin007/mssqldb:2014-express .

Run Command

docker run -tid --name mssqldb-2014-express -p1433:1433 --isolation=hyperv anushibin007/mssqldb:2014-express

Follow for more 😀

2 thoughts on “[68] Microsoft SQL Server 2014 on Docker

Leave a comment