Windows Server version 1709 brings the following important improvements that developers can take advantage of with the updated container images.
First of all, the microsoft/windowsservercore image underneath SQL shrunk by more than 2GB, so the SQL Server images are also 2GB smaller.
If you want to store your databases on remote storage, you can now by using global SMB mounts (New-SMBGlobalMapping) along with a docker volume (docker run -v c:\shared:c:\data microsoft/mssql-express-…).
Seems like a useful improvement.
Now, if this is the first time working with Kubernetes you won’t have to perform the next couple of steps but just to confirm, run the following: –kubectl config current-context
If your shell cannot find the kubectl command, add
to your PATH environment variable and restart your shell.
If the command outputs anything other than docker-for-desktop you will need to switch to the desktop cluster.
Click through to see how to set this up.
A web search will almost certainly point you to lots of similar posts, mostly (if not) all of which start instructing you to add unofficial or unrecognized sources, keys etc. Therefore my intention with this post is not to replace official documentation, but to make the process as simple as possible, whilst still pointing to all the official documentation so that you can be confident you are not breaking security or other such things!
You can head over to the following Docker page Get Docker CE for Ubuntu for the initial setup and updates, but for simplicity, you can follow along below.
The installation instructions will also work for Ubuntu and other related variants.
I work with SQL Server in containers pretty much exclusively when testing code and one of my real bug bears is that SQL Server in containers does not support Windows authentication (unless you’re using Windocks).
So when I’m working I find it quite annoying to have to specify a SA username & password when I want to connect.
OK, I can use Get-Credential, assign to a variable, and then reference that in a connection string but I want something a bit more permanent especially as I always use the same password for all my containers
Read on for Andrew’s method, and check out Rob Sewell’s method in the comments.
Managing the password, access tokens and private keys are being tedious in the application. Any small mistakes accidentally expose all the secret information. Even storing such thing in docker images can be easily accessible one should just run the image in the interactive mode container and all your application code is available in containers. Docker provides secrets to protect all secret data.
This blog explains the low-level of storage information as well as secured access to docker secret. so, let’s get started.
Read the whole thing, especially if you’ve gone container-happy.
Problem 1 Image Tag
There is no image tag specified for the microsoft/mssql-server-linux image, therefore, if Microsoft push a newer version of the image to docker hub, this will be pulled down from docker hub when the build pipeline runs. This is easily fixed by tagging the image with a tag for an explicit version, e.g. microsoft/mssql-server-linux:2017-GA.
Click through for the starting code, two additional issues, and the corrected code.
liftr 📦 by Nan Xiao
— Mara Averick (@dataandme) October 15, 2017
liftr aims to solve the problem of persistent reproducible reporting. To achieve this goal, it extends the R Markdown metadata format, and uses Docker to containerize and render R Markdown documents.
Click through for those resources as well as an addictive 8-bit animated GIF.
In only a few seconds you have a SQL 2017 instance up and running (Take a look at Andrews blog at dbafromthecold.com for a great container series with much greater detail)
Now that we have our container we need to connect to it. We need to gather the IPAddress. We can do this using docker command docker inspect but I like to make things a little more programmatical. This works for my Windows 10 machine for Windows SQL Containers. There are some errors with other machines it appears but there is an alternative below
Read the whole thing.
Jan said that he had gotten the SQL Agent running in Linux containers so I asked if he could send on his code and he very kindly obliged.
So, the disclaimer for this blog post is that I didn’t write the code here, Jan did. All I’ve done is drop it into a dockerfile so that an image can be built. Thank you very much Jan!
Click through for Jan’s code and Andrew’s presentation of the process.
The flagship of the OpenCPU system is the OpenCPU server: a mature and powerful Linux stack for embedding R in systems and applications. Because OpenCPU is completely open source we can build and ship on DockerHub. A ready-to-go linux server with both OpenCPU and RStudio can be started using the following (use port 8004 or 80):
docker run -t -p 8004:8004 opencpu/rstudio
Now simply open http://localhost:8004/ocpu/ and http://localhost:8004/rstudio/ in your browser! Login via rstudio with user:
opencpu) to build or install apps. See the readme for more info.
This is in the context of one particular product, but the reasons fit other scenarios too. H/T R-Bloggers