SlideShare a Scribd company logo
Introduction to Containers
SQL Server and Docker
Introduction
to Containers
Chris Taylor
Worked with SQL Server since 2002
MCSE – Data Platform
Exceptional DBA Award finalist
Damn that Jeff Moden and his RBAR and Tally tables ☺
SQLNE PASS Chapter Group Leader
SQLRelay Organiser
Partnerships:
• SentryOne Partner / PAC
• Redgate Partner / FORG
• Pragmatic Works Partner
• Nitrosphere Partner
Formerly one of those “dirty devs”
@SQLGeordie
http://www.tonyvalderama.com/images/viz/sidsexist.gif https://i.pinimg.com/originals/54/55/ac/5455accb7ce75570b750bbe6ecdab906.jpg
All images © the official Viz web site http://www.viz.co.uk
Agenda
• Session Aim
• What are containers?
• Containers vs Virtual Machines
• Images
• Getting Setup
• Volumes
• Dockerfile
• Docker Hub
• Briefly:
• Logs and troubleshooting
• Multi-Container Applications
• Licensing
• Performance
• Q&A
Not on the Agenda
• Docker-Machine
• Docker-Swarm
• Networking and Linking
Session Aim
• High(ish) level insight into containers and what you can do with them
• Learn by example
• Demo’s
• My mistakes ☺
• Enough of a taste to get the container bug and start experimenting!
Well, it worked on my
machine!
The Problem
https://cdn.geekwire.com/wp-content/uploads/2012/02/nerd-bigstock_Extreme_Computer_Nerd_1520708.jpg
Those pesky Dev’s!!
The Real Problem
• Variances:
• Environmental
• Hardware
• Security
What are Containers
• Next evolution in virtualisation
• Lightweight, stand alone, executable package of a piece of software
• Separation of applications or services on the same container host
• Isolated, resource controlled, and portable operating environment
• Enables true independence between applications / infrastructure /
developers / IT ops
“Basically, a container is an isolated place where an application
can run without affecting the rest of the system, and without the
system affecting the application.”
https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/
Container History
• 1979 – Unix v7 (chroot)
• 2000 – FreeBSD Jails
• 2001 – Linux VServer
• 2004 – Oracle Solaris Containers
• 2005 – Open Virtuzzo
• 2006 – Process Containers
• 2008 – Linux Containers (LXC)
• 2011 – Cloud Foundry Warden
• 2013 – Let Me Contain That For You (LMCTFY)
• 2013 – Docker and the Future
• 2015 – VMWare vSphere and Container Integration (Project Bonneville)
• Hybrid virtualisation with vSphere and vCloud Director
• 2016 – Windows Server 2016 and Windows 10 (Pro/Anniversary) support
http://blog.aquasec.com/a-brief-history-of-containers-from-1970s-chroot-to-docker-2016
What is Docker?
https://www.docker.com/what-container
Kernel
• The core of the OS
• Application requests will go through this
• Controls everything from access to the HDD to memory management
• Runs in it’s own memory space
“It can be thought of as the program which controls all other programs
on the computer”
https://simple.wikipedia.org/wiki/Kernel_(computer_science)
Container Overview
Physical Server
Host Operating System
Docker / Container Engine
Bins/Libs
App A
Bins/Libs
App B App B App BApp A
Pros
• Consolidation:
• Average container size can be very small (Not Windows/SQL Server - ~12GB)
• Less Resource Intensive
• Server can host significantly more containers than virtual machines.
• Low Cost:
• Potentially decrease your operating cost (less servers, less staff) and your development
cost (develop for one consistent runtime environment).
• Speed:
• Can spin up in seconds
• Decrease the time needed for development, testing, and deployment of applications
and services
• Consistency:
• Simplify deployments, no difference between running your application locally, on a test
server, or in production.
• Great option for microservices, DevOps and continuous deployment.
Cons
• Security:
• Sharing of the Kernel / OS Components means less isolation
• Hyper-V Containers?
• OS Flexibility:
• Becoming less of an issue with Windows Integration and the Docker CLi.
• Networking:
• Can be tricky
• Maintaining connections whilst maintaining isolation
• Management:
• Seen as an art
• Various tools becoming more popular (ie. Swarm/Kubernetes)
So how are Containers different to VMs?
Virtual Machine vs Containers
Virtual Machines
• Contain a complete operating system
and applications
• Hypervisor-based virtualization can be
resource intensive
• Can be large
• Hypervisors used to share and manage
hardware
• Virtual machines residing on the same
host can run different operating
systems
Windows Containers
• Bound by the host operating system /
daemon, containers on the same server
use the same OS
• Smaller size
• Windows Images still large(ish)
• Virtualizing the underlying operating
system
• Share the kernel of the host OS to
access the hardware
• Best Practice - 1 process per container
• Portability
Virtual Machine vs Windows Container
Virtual Machines Windows Container
Physical Server
Host Operating System
Docker / Container Engine
Bins/Libs
App A
Bins/Libs
App B App B App BApp A
VM 2
Physical Server
Host Operating System
Hypervisor
VM 1
Guest OS
Bins/Libs
App A
Guest OS
Bins/Libs
App A
VM 3
Guest OS
Bins/Libs
App B
Windows Containers vs Hyper-V Containers
Windows Server containers
• Multiple container instances can
run concurrently on a host
• Provide application isolation
through process and namespace
isolation technology.
• Shares a kernel with the host
and all containers running on
the host
• Simplifies patching!
Hyper-V containers
• Multiple container instances can
run concurrently on a host
• Each container runs inside of a
special virtual machine.
• Kernel level isolation
• Windows 10 always runs Hyper-V
containers
Windows Containers vs Hyper-V Containers
Windows Container Hyper-V Container
Physical Server
Host Operating System
Docker / Container Engine
Bins/Libs
App A
Bins/Libs
App B App B App BApp A
Hyper-V Container
Physical Server
Host Operating System
Docker / Container Engine
Hyper-V Container
Base Image
Kernel
(Isolated Copy)
Bins/Libs
App A
Base Image
Kernel
(Isolated Copy)
Bins/Libs
App A
Hyper-V Container
Base Image
Kernel
(Isolated Copy)
Bins/Libs
App B
Containers and VMs Together
https://www.docker.com/what-container
Container Terminology – The Basics
• Container Host
• Physical or Virtual computer system configured with the Windows Container feature.
• Container OS Image
• Containers are deployed from images. The container OS image is the first layer in
potentially many image layers that make up a container. This image provides the
operating system environment.
• Container Image
• A container image contains the base operating system, application, and all application
dependencies needed to quickly deploy a container.
• Container Registry
• Container images are stored in a container registry, and can be downloaded on
demand.
• Dockerfile
• Dockerfiles are used to automate the creation of container images.
What do I need to get setup?
• Downloads
• Host Machine Setup
• Enable Features
• Installing the Docker Engine
• Hyper-V setup
• If you wish to use a VM as the Host
Downloads
• Can run Docker direct from
host/dev machine
• but I don't like installing anything
locally I don't have to ☺
• Download:
• Docker for Windows (Used for
Windows 10)
• SSMS 17.X (or other compatible
version)
• OR SQL Server Operations Studio…
https://www.docker.com/community-edition#/download
Host Machine Setup
• Enough RAM for VM running Docker (Minimum 3250MB for Docker)
• OS – Windows 10 Pro or Anniversary Edition
• Host processors require nested virtualisation
• Enable Hyper-V on Host
• Hyper-V Settings
• Create Virtual Switch with External Access
Installing the Docker engine (Windows 10)
Enable-WindowsOptionalFeature -Online -FeatureName:Microsoft-Hyper-V -All
# Download script and run:
.Enable-NestedVm.ps1 "Win10_Docker“
Install Docker for Windows
docker container run hello-world:nanoserver
Installing the Docker EE engine (Windows Server 2016)
# PowerShell module from Docker Inc.
Install-Module -Name DockerProvider –Force (Or use DockerMSFTProvider)
# Install package docker from the provide DockerMsftProvider (does not work on Win10)
Install-Package -Name docker -ProviderName DockerProvider –Force (Or use DockerMSFTProvider)
Restart-Computer -Force
# Test running a container
docker run hello-world:nanoserver
Enable Features
Windows Server 2016 Windows 10
Containers on Azure
Hyper-V Setup – Windows 10 Pro
Build a Hyper-V VM with
either Windows 10 Pro
or Anniversary Edition
Enable Hyper-V
(Win 10 always
Hyper-V
Containers)
Enable
Nested
Virtualisation
Install Docker
for Windows
Install SSMS
If you wish to use it!
Hyper-V Setup – Windows Server 2016
Build a Hyper-V
VM with
Windows Server
2016
Install
PowerShell
Module
(DockerProvider)
Install
PowerShell
Package
(DockerProvider)
Enable Hyper-V
(if you wish to use
Hyper-V containers)
Install SSMS
If you wish to use it!
Windows Firewall Issue?
• Different menu’s if you have the firewall enabled
• Cannot share drives from Host to Container
• Possible Fixes:
• Port 445 blocked?
• Allow connection to 10.0.75.1 port 445 (the Windows host) from 10.0.75.2 (the virtual
machine)
• Restriction on network profile?
• vEthernet (DockerNAT) to Private?
• Disable/Enable “File and Printer Sharing for Microsoft Networks”?
• Did nothing for me!
Docker Commands
• docker version
• docker search <imagename>
• docker pull <imagename>:<tag>
• docker images
• docker run <parameters>
• docker ps –a
• docker inspect <containername>
• docker logs <containername>
• docker stop <containername>
• docker start <containername>
• docker commit
• docker push <imagename>
• docker rm <containername>
• docker rmi <imagename>
Volumes vs Mounts
Volumes
• Does not increase size of the container
• Easier to back up or migrate than bind
mounts.
• Work on both Linux and Windows
containers.
• Can be safely shared among multiple
containers.
• Volume drivers allow you to store
volumes on remote hosts or cloud
providers, to encrypt the contents of
volumes, or to add other functionality.
Bind Mounts
• Host file/folder is mounted into a
container
• Limited functionality compared to
volumes
• Not portable between images
• Rely on the host machine’s filesystem
having a specific directory structure
available
SQL on Linux Container
DEMO
That’s fantastic, but I have a
gazillion databases to
restore!!!
http://giftsforlearning.com/wp/tough-questions-with-no-good-answers-whats-a-parent-to-do/
Dockerfile
• Contains instructions (commands) to create an image
• Each instruction creates a layer!
• Automate builds using docker build
• Dockerfile – no file extension
docker build -t newimagename .
Beware!
• Be careful with creating too many (unnecessary?) instructions
• Remember the layering?
• Wrap the instructions into minimal layers / commits:
Multiple Layer Image Simplified Image
FROM microsoft/mssql-server-linux:latest
WORKDIR /usr/src
COPY ./shell /usr/src/sqlscript
RUN chmod +x /usr/src/restoredb1.sh
RUN chmod +x /usr/src/restoredb2.sh
RUN chmod 755 /usr/src
CMD /bin/bash ./entrypoint.sh
FROM microsoft/mssql-server-linux:latest
WORKDIR /usr/src
COPY ./shell /usr/src
RUN chmod +x /usr/src/restoredb1.sh && 
chmod +x /usr/src/restoredb2.sh && 
chmod 755 /usr/src
CMD /bin/bash ./entrypoint.sh
NOTE!!
• Repository must be lowercase
• docker build imagenamehere .
• ENV attach_dbs doesn't work for Linux containers
• Works on Windows containers
• COPY and run .sql in shell (sh) scripts OR
• sqlcmd CREATE DATABASE……FOR ATTACH
• sqlservr.sh
• opt/mssql/bin/sqlservr.sh doesn't exist anymore
• opt/mssql/bin/sqlservr instead
• If you don't then SQL Server won't start and no scripts can execute
• Run something like /bin/bash script afterwards
Dockerfile
DEMO
Image Sharing and Reuse
• Export/Import (local)
docker save --output= busybox.tar busybox
docker load --input busybox.tar
• DockerHub (cloud)
• Commit a Container
docker commit sqllinuxrestore sqllinuxrestore:v1
• Tag an Image
docker tag sqllinuxrestore:v1 sqlgeordie/sqlrepository:sqllinuxrestore
• Push to Docker Hub
docker push sqlgeordie/sqlrepository:sqllinuxrestore
Docker Hub - hub.docker.com
Repository
Images and Tags Make sure you tag your images!
Microsoft Images and Tags
mssql-server-linux mssql-server-windows-developer mssql-server-windows-express
2017-latest
2017-CU1
latest
2017-GA
2017-latest
latest
2017-GA
2017-CU1
2017
2017-windowsservercore-10.0.14393.1715
2016-sp1
2016-sp1-windowsservercore-10.0.14393.1715
2016-sp1-windowsservercore-10.0.14393.1480
2016-sp1-windowsservercore-10.0.14393.1198
2016-sp1-windowsservercore-10.0.14393.693
2017-latest
latest
2017-GA
2017-CU1
2017-windowsservercore-10.0.14393.1715
2017
2016-sp1
2016-sp1-windowsservercore-10.0.14393.1715
2016-sp1-windowsservercore-10.0.14393.1480
2016-sp1-windowsservercore-10.0.14393.1198
2016-sp1-windowsservercore-10.0.14393.693
2016-windowsservercore-10.0.14393.447
2016
2016-sp1-windowsservercore-10.0.14393.447
*Notice there is nothing pre-2016, MSFT do not support these but there are some publicly available – see Andrew Pruski - https://hub.docker.com/u/dbafromthecold/
Docker Hub
DEMO
Logs and Trouble Shooting
• Limited monitoring out the box
• Docker Knowledge Hub
• docker logs <container_name>
• Docker Cli logs
• Could use TP tools
• eg. SentryOne, cAdvisor (Google)
https://docs.docker.com/docker-for-windows/troubleshoot/
Docker-Compose(Multi-Container Applications)
• docker-compose <build>
• yml (YAML) files
version: "3"
services:
web:
build: .
ports:
- "8000:80"
depends_on:
- db
db:
image: "microsoft/mssql-server-linux"
environment:
SA_PASSWORD: "your_password"
ACCEPT_EULA: "Y"
Licensing (Docker)
• Community Edition (CE)
• Free!
• Enterprise Edition (EE)
• 3 Levels (Basic / Standard / Advanced)
• $1500 - $3500 / Node / yr
• EE Basic free for Windows Server 2016 customers
https://www.docker.com/pricing
Licensing (Windows)
Production
• Licensing is at the host level,
• each machine or VM which is
running Docker.
• run any number of Windows
Docker containers on that host.
• Windows Server 2016
• support from Microsoft and
Docker, Inc.
Development
• Docker for Windows runs on
Windows 10 and is free, open-
source software.
• Docker for Windows can also run
a Linux VM on your machine
• Like the server version, run any
number of Windows Docker
containers.
https://blog.docker.com/2017/01/docker-windows-server-image2docker/
Licensing (SQL Server)
• Licensing has not been finalised
• Express and Developer Editions are free
• Standard and Enterprise will have a cost
• Think VM Licensing
https://github.com/Microsoft/mssql-docker
https://www.microsoft.com/en-us/sql-server/sql-server-2017-editions
“Regardless of where you run it - VM, Docker, physical, cloud, on prem -
the licensing model is the same and it depends on which edition of SQL
Server you are using.”
Performance
• See link to Simon Sabin’s blog:
• https://sabin.io/blog/sql-server-container-performance/
• Summary:
• “The container seems a bit faster up to four users, but then trails off with the
VM being faster later on.”
• Expected the container to outperform the VM by a factor of 10-20%.
• Difficult to draw any real conclusions.
• Not enough reasons from a performance standpoint to recommend containers
for database hosting in an enterprise environment.”
Alternatives and TPVs
• WinDocks
• Allows images of older versions of SQL Server to be created
• Portainer.io
• GUI based tool
• Kubernetes
• Docker Swarm
• Amazon Elastic Container Service (ECS)
• Azure Container Service
• Marathon
• CoreOS Fleet
• Open Stack Magnum
• Diego
• Hashicorp Nomad
Conclusion
Good
• Docker provides a facility to
quickly provision environments
• Consolidation and space savings
can be exceptional
• Docker Hub has 1000’s of
publicly available repositories /
images
Not so good
• Storage fiddly / not user friendly
• Lack of monitoring via Docker
• TP tools available – cAdvisor
• Platform Independency still in its
infancy
• Windows Docker Service
Summary
• Session Aim
• What are containers?
• Containers vs Virtual Machines
• Images
• Getting Setup
• Volumes
• Dockerfile
• Docker Hub
• Briefly:
• Logs and troubleshooting
• Multi-Container Applications
• Licensing
• Performance
Contact
Twitter
@SQLGeordie
Email
chris.taylor@jarrinconsultancy.com
Blog
www.jarrinconsultancy.comblog
www.chrisjarrintaylor.co.uk
Questions?
Links
• SQL Server on Linux:
• SQLPAL: https://blogs.technet.microsoft.com/dataplatforminsider/2016/12/16/sql-server-on-
linux-how-introduction/
•
• Getting Started:
• Docker 101: https://www.slideshare.net/Docker/docker-101-nov-2016?next_slideshow=2Docker
101 - Nov 2016
• https://www.simple-talk.com/sysadmin/virtualization/working-windows-containers-docker-
basics/
•
• Simple Hello World on nanoserver:
• https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/quick-start-
windows-10
•
Links
• Introduction:
• Docker introduction
• General:
• https://blog.sixeyed.com/windows-containers-and-docker-5-things-you-need-to-know/
• Licensing:
• https://blog.docker.com/2017/01/docker-windows-server-image2docker/
• Installing:
• https://mathaywardhill.com/2017/04/12/installing-sql-server-vnext-on-linux-using-docker-
on-windows-10/
• SQL On Linux:
• https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-docker
• https://roadtoalm.com/2017/01/06/running-a-linux-sql-server-in-a-docker-container/
• Connecting to SQL via sqlcmd:
• http://searchsqlserver.techtarget.com/tip/Use-these-commands-to-deploy-SQL-Server-
Docker-containers
Links
• Nested Virtualisation (for VMs):
• https://www.youtube.com/watch?v=ycCK1EyJG6Y (nested virtualisation)
• Windocks:
• https://www.windocks.com/blog-2/Windows-Containers-at-Work
• Performance:
• https://sabin.io/blog/sql-server-container-performance/
• https://facility9.com/2017/01/how-do-i-update-my-sql-server-docker-container/
• Error pushing image (add collaborators):
• http://stackoverflow.com/questions/41984399/denied-requested-access-to-the-resource-is-denied-
docker/42403423
• Terminology:
• http://itproguru.com/expert/2016/10/docker-create-container-change-container-save-as-new-image-and-connect-to-
container/
• Volumes:
• http://paper.li/e-1483951345?read=https%3A%2F%2Fptop.only.wip.la%3A443%2Fhttp%2Fthedatafarm.com%2Fdata-access%2Fmashup-sql-server-on-linux-in-
docker-on-a-mac-with-visual-studio-code%2F
• http://www.tricksofthetrades.net/2016/03/14/docker-data-volumes/
• https://www.richard-banks.org/2017/03/connecting-to-sql-on-docker.html
Links
• Hyper-V containers:
• https://www.simple-talk.com/sysadmin/virtualization/working-windows-containers-docker-
stride/?utm_source=simpletalk&utm_medium=pubemail&utm_content=20170512-
slota2&utm_term=simpletalkmain
• https://hyper-v.nu/archives/hvredevoort/2015/05/nested-hypervisor-in-windows-server-
vnext/
• https://blogs.technet.microsoft.com/uktechnet/2016/01/11/windows-containers-what-they-
are-and-how-they-work/
• Windows Server and Docker - The Internals Behind Bringing Docker and Containers to
Windows by Taylor Brown and John Starks
• Tutorials:
• Docker Container Tutorial #1 Containers vs Images - Focuses on Ubuntu
• Learn Docker in 12 Minutes 🐳
• Learn Docker in 20 Minutes
Ad

More Related Content

What's hot (20)

Docker.pptx
Docker.pptxDocker.pptx
Docker.pptx
balaji257
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
DuckDuckGo
 
The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps Toolkit
Weaveworks
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Robert Reiz
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Peng Xiao
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
Abe Diaz
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
Ajeet Singh Raina
 
Docker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersDocker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and Containers
Yajushi Srivastava
 
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
Edureka!
 
What is Docker
What is DockerWhat is Docker
What is Docker
Pavel Klimiankou
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
Rishabh Kumar
 
Docker introduction &amp; benefits
Docker introduction &amp; benefitsDocker introduction &amp; benefits
Docker introduction &amp; benefits
Amit Manwade
 
Intro to GitOps & Flux.pdf
Intro to GitOps & Flux.pdfIntro to GitOps & Flux.pdf
Intro to GitOps & Flux.pdf
Weaveworks
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
JasonStraughan1
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
Eueung Mulyana
 
Tenants: A Look Behind the Scenes
Tenants: A Look Behind the ScenesTenants: A Look Behind the Scenes
Tenants: A Look Behind the Scenes
OutSystems
 
Migrating a Large Fortune 100 Healthcare Company to Kubernetes in 7 months
Migrating a Large Fortune 100 Healthcare Company to Kubernetes in 7 monthsMigrating a Large Fortune 100 Healthcare Company to Kubernetes in 7 months
Migrating a Large Fortune 100 Healthcare Company to Kubernetes in 7 months
Konveyor Community
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
Phuc Nguyen
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.sk
Juraj Hantak
 
The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps Toolkit
Weaveworks
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Robert Reiz
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Peng Xiao
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
Abe Diaz
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
Ajeet Singh Raina
 
Docker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersDocker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and Containers
Yajushi Srivastava
 
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
Edureka!
 
Docker introduction &amp; benefits
Docker introduction &amp; benefitsDocker introduction &amp; benefits
Docker introduction &amp; benefits
Amit Manwade
 
Intro to GitOps & Flux.pdf
Intro to GitOps & Flux.pdfIntro to GitOps & Flux.pdf
Intro to GitOps & Flux.pdf
Weaveworks
 
Tenants: A Look Behind the Scenes
Tenants: A Look Behind the ScenesTenants: A Look Behind the Scenes
Tenants: A Look Behind the Scenes
OutSystems
 
Migrating a Large Fortune 100 Healthcare Company to Kubernetes in 7 months
Migrating a Large Fortune 100 Healthcare Company to Kubernetes in 7 monthsMigrating a Large Fortune 100 Healthcare Company to Kubernetes in 7 months
Migrating a Large Fortune 100 Healthcare Company to Kubernetes in 7 months
Konveyor Community
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
Phuc Nguyen
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.sk
Juraj Hantak
 

Similar to Introduction to Containers - SQL Server and Docker (20)

Introduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUGIntroduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUG
Ajeet Singh Raina
 
Container and Cloud Native Application: What is VMware doing in this space? -...
Container and Cloud Native Application: What is VMware doing in this space? -...Container and Cloud Native Application: What is VMware doing in this space? -...
Container and Cloud Native Application: What is VMware doing in this space? -...
gguglie
 
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
Ido Flatow
 
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep DiveDocker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker, Inc.
 
Introduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker CaptainIntroduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker Captain
Ajeet Singh Raina
 
ma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptxma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptx
imenhamada17
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
Wyn B. Van Devanter
 
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Van Phuc
 
Containers and Docker
Containers and DockerContainers and Docker
Containers and Docker
Damian T. Gordon
 
Docker
DockerDocker
Docker
Codeister Technolgoies
 
Introduction to Containers & Diving a little deeper into the benefits of Con...
 Introduction to Containers & Diving a little deeper into the benefits of Con... Introduction to Containers & Diving a little deeper into the benefits of Con...
Introduction to Containers & Diving a little deeper into the benefits of Con...
Synergetics Learning and Cloud Consulting
 
Docker slides
Docker slidesDocker slides
Docker slides
Jyotsna Raghuraman
 
An introduction to configuring Domino for Docker
An introduction to configuring Domino for DockerAn introduction to configuring Domino for Docker
An introduction to configuring Domino for Docker
Gabriella Davis
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
javaonfly
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
Aditya Konarde
 
Windows server containers
Windows server containersWindows server containers
Windows server containers
Sri Kanth
 
Windows server containers
Windows server containersWindows server containers
Windows server containers
Sri Kanth
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and Microservice
Samuel Chow
 
OpenStack Summit
OpenStack SummitOpenStack Summit
OpenStack Summit
Docker, Inc.
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
Wyn B. Van Devanter
 
Introduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUGIntroduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUG
Ajeet Singh Raina
 
Container and Cloud Native Application: What is VMware doing in this space? -...
Container and Cloud Native Application: What is VMware doing in this space? -...Container and Cloud Native Application: What is VMware doing in this space? -...
Container and Cloud Native Application: What is VMware doing in this space? -...
gguglie
 
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
From VMs to Containers: Introducing Docker Containers for Linux and Windows S...
Ido Flatow
 
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep DiveDocker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker, Inc.
 
Introduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker CaptainIntroduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker Captain
Ajeet Singh Raina
 
ma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptxma-formation-en-Docker-jlklk,nknkjn.pptx
ma-formation-en-Docker-jlklk,nknkjn.pptx
imenhamada17
 
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Van Phuc
 
Introduction to Containers & Diving a little deeper into the benefits of Con...
 Introduction to Containers & Diving a little deeper into the benefits of Con... Introduction to Containers & Diving a little deeper into the benefits of Con...
Introduction to Containers & Diving a little deeper into the benefits of Con...
Synergetics Learning and Cloud Consulting
 
An introduction to configuring Domino for Docker
An introduction to configuring Domino for DockerAn introduction to configuring Domino for Docker
An introduction to configuring Domino for Docker
Gabriella Davis
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
javaonfly
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
Aditya Konarde
 
Windows server containers
Windows server containersWindows server containers
Windows server containers
Sri Kanth
 
Windows server containers
Windows server containersWindows server containers
Windows server containers
Sri Kanth
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and Microservice
Samuel Chow
 
Ad

Recently uploaded (20)

Asthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdfAsthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdf
VanessaRaudez
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
"PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System""PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System"
Jainul Musani
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
 
Asthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdfAsthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdf
VanessaRaudez
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
"PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System""PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System"
Jainul Musani
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
 
Ad

Introduction to Containers - SQL Server and Docker

  • 1. Introduction to Containers SQL Server and Docker
  • 2. Introduction to Containers Chris Taylor Worked with SQL Server since 2002 MCSE – Data Platform Exceptional DBA Award finalist Damn that Jeff Moden and his RBAR and Tally tables ☺ SQLNE PASS Chapter Group Leader SQLRelay Organiser Partnerships: • SentryOne Partner / PAC • Redgate Partner / FORG • Pragmatic Works Partner • Nitrosphere Partner Formerly one of those “dirty devs” @SQLGeordie http://www.tonyvalderama.com/images/viz/sidsexist.gif https://i.pinimg.com/originals/54/55/ac/5455accb7ce75570b750bbe6ecdab906.jpg All images © the official Viz web site http://www.viz.co.uk
  • 3. Agenda • Session Aim • What are containers? • Containers vs Virtual Machines • Images • Getting Setup • Volumes • Dockerfile • Docker Hub • Briefly: • Logs and troubleshooting • Multi-Container Applications • Licensing • Performance • Q&A
  • 4. Not on the Agenda • Docker-Machine • Docker-Swarm • Networking and Linking
  • 5. Session Aim • High(ish) level insight into containers and what you can do with them • Learn by example • Demo’s • My mistakes ☺ • Enough of a taste to get the container bug and start experimenting!
  • 6. Well, it worked on my machine!
  • 8. The Real Problem • Variances: • Environmental • Hardware • Security
  • 9. What are Containers • Next evolution in virtualisation • Lightweight, stand alone, executable package of a piece of software • Separation of applications or services on the same container host • Isolated, resource controlled, and portable operating environment • Enables true independence between applications / infrastructure / developers / IT ops “Basically, a container is an isolated place where an application can run without affecting the rest of the system, and without the system affecting the application.” https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/
  • 10. Container History • 1979 – Unix v7 (chroot) • 2000 – FreeBSD Jails • 2001 – Linux VServer • 2004 – Oracle Solaris Containers • 2005 – Open Virtuzzo • 2006 – Process Containers • 2008 – Linux Containers (LXC) • 2011 – Cloud Foundry Warden • 2013 – Let Me Contain That For You (LMCTFY) • 2013 – Docker and the Future • 2015 – VMWare vSphere and Container Integration (Project Bonneville) • Hybrid virtualisation with vSphere and vCloud Director • 2016 – Windows Server 2016 and Windows 10 (Pro/Anniversary) support http://blog.aquasec.com/a-brief-history-of-containers-from-1970s-chroot-to-docker-2016
  • 13. Kernel • The core of the OS • Application requests will go through this • Controls everything from access to the HDD to memory management • Runs in it’s own memory space “It can be thought of as the program which controls all other programs on the computer” https://simple.wikipedia.org/wiki/Kernel_(computer_science)
  • 14. Container Overview Physical Server Host Operating System Docker / Container Engine Bins/Libs App A Bins/Libs App B App B App BApp A
  • 15. Pros • Consolidation: • Average container size can be very small (Not Windows/SQL Server - ~12GB) • Less Resource Intensive • Server can host significantly more containers than virtual machines. • Low Cost: • Potentially decrease your operating cost (less servers, less staff) and your development cost (develop for one consistent runtime environment). • Speed: • Can spin up in seconds • Decrease the time needed for development, testing, and deployment of applications and services • Consistency: • Simplify deployments, no difference between running your application locally, on a test server, or in production. • Great option for microservices, DevOps and continuous deployment.
  • 16. Cons • Security: • Sharing of the Kernel / OS Components means less isolation • Hyper-V Containers? • OS Flexibility: • Becoming less of an issue with Windows Integration and the Docker CLi. • Networking: • Can be tricky • Maintaining connections whilst maintaining isolation • Management: • Seen as an art • Various tools becoming more popular (ie. Swarm/Kubernetes)
  • 17. So how are Containers different to VMs?
  • 18. Virtual Machine vs Containers Virtual Machines • Contain a complete operating system and applications • Hypervisor-based virtualization can be resource intensive • Can be large • Hypervisors used to share and manage hardware • Virtual machines residing on the same host can run different operating systems Windows Containers • Bound by the host operating system / daemon, containers on the same server use the same OS • Smaller size • Windows Images still large(ish) • Virtualizing the underlying operating system • Share the kernel of the host OS to access the hardware • Best Practice - 1 process per container • Portability
  • 19. Virtual Machine vs Windows Container Virtual Machines Windows Container Physical Server Host Operating System Docker / Container Engine Bins/Libs App A Bins/Libs App B App B App BApp A VM 2 Physical Server Host Operating System Hypervisor VM 1 Guest OS Bins/Libs App A Guest OS Bins/Libs App A VM 3 Guest OS Bins/Libs App B
  • 20. Windows Containers vs Hyper-V Containers Windows Server containers • Multiple container instances can run concurrently on a host • Provide application isolation through process and namespace isolation technology. • Shares a kernel with the host and all containers running on the host • Simplifies patching! Hyper-V containers • Multiple container instances can run concurrently on a host • Each container runs inside of a special virtual machine. • Kernel level isolation • Windows 10 always runs Hyper-V containers
  • 21. Windows Containers vs Hyper-V Containers Windows Container Hyper-V Container Physical Server Host Operating System Docker / Container Engine Bins/Libs App A Bins/Libs App B App B App BApp A Hyper-V Container Physical Server Host Operating System Docker / Container Engine Hyper-V Container Base Image Kernel (Isolated Copy) Bins/Libs App A Base Image Kernel (Isolated Copy) Bins/Libs App A Hyper-V Container Base Image Kernel (Isolated Copy) Bins/Libs App B
  • 22. Containers and VMs Together https://www.docker.com/what-container
  • 23. Container Terminology – The Basics • Container Host • Physical or Virtual computer system configured with the Windows Container feature. • Container OS Image • Containers are deployed from images. The container OS image is the first layer in potentially many image layers that make up a container. This image provides the operating system environment. • Container Image • A container image contains the base operating system, application, and all application dependencies needed to quickly deploy a container. • Container Registry • Container images are stored in a container registry, and can be downloaded on demand. • Dockerfile • Dockerfiles are used to automate the creation of container images.
  • 24. What do I need to get setup? • Downloads • Host Machine Setup • Enable Features • Installing the Docker Engine • Hyper-V setup • If you wish to use a VM as the Host
  • 25. Downloads • Can run Docker direct from host/dev machine • but I don't like installing anything locally I don't have to ☺ • Download: • Docker for Windows (Used for Windows 10) • SSMS 17.X (or other compatible version) • OR SQL Server Operations Studio… https://www.docker.com/community-edition#/download
  • 26. Host Machine Setup • Enough RAM for VM running Docker (Minimum 3250MB for Docker) • OS – Windows 10 Pro or Anniversary Edition • Host processors require nested virtualisation • Enable Hyper-V on Host • Hyper-V Settings • Create Virtual Switch with External Access
  • 27. Installing the Docker engine (Windows 10) Enable-WindowsOptionalFeature -Online -FeatureName:Microsoft-Hyper-V -All # Download script and run: .Enable-NestedVm.ps1 "Win10_Docker“ Install Docker for Windows docker container run hello-world:nanoserver
  • 28. Installing the Docker EE engine (Windows Server 2016) # PowerShell module from Docker Inc. Install-Module -Name DockerProvider –Force (Or use DockerMSFTProvider) # Install package docker from the provide DockerMsftProvider (does not work on Win10) Install-Package -Name docker -ProviderName DockerProvider –Force (Or use DockerMSFTProvider) Restart-Computer -Force # Test running a container docker run hello-world:nanoserver
  • 31. Hyper-V Setup – Windows 10 Pro Build a Hyper-V VM with either Windows 10 Pro or Anniversary Edition Enable Hyper-V (Win 10 always Hyper-V Containers) Enable Nested Virtualisation Install Docker for Windows Install SSMS If you wish to use it!
  • 32. Hyper-V Setup – Windows Server 2016 Build a Hyper-V VM with Windows Server 2016 Install PowerShell Module (DockerProvider) Install PowerShell Package (DockerProvider) Enable Hyper-V (if you wish to use Hyper-V containers) Install SSMS If you wish to use it!
  • 33. Windows Firewall Issue? • Different menu’s if you have the firewall enabled • Cannot share drives from Host to Container • Possible Fixes: • Port 445 blocked? • Allow connection to 10.0.75.1 port 445 (the Windows host) from 10.0.75.2 (the virtual machine) • Restriction on network profile? • vEthernet (DockerNAT) to Private? • Disable/Enable “File and Printer Sharing for Microsoft Networks”? • Did nothing for me!
  • 34. Docker Commands • docker version • docker search <imagename> • docker pull <imagename>:<tag> • docker images • docker run <parameters> • docker ps –a • docker inspect <containername> • docker logs <containername> • docker stop <containername> • docker start <containername> • docker commit • docker push <imagename> • docker rm <containername> • docker rmi <imagename>
  • 35. Volumes vs Mounts Volumes • Does not increase size of the container • Easier to back up or migrate than bind mounts. • Work on both Linux and Windows containers. • Can be safely shared among multiple containers. • Volume drivers allow you to store volumes on remote hosts or cloud providers, to encrypt the contents of volumes, or to add other functionality. Bind Mounts • Host file/folder is mounted into a container • Limited functionality compared to volumes • Not portable between images • Rely on the host machine’s filesystem having a specific directory structure available
  • 36. SQL on Linux Container DEMO
  • 37. That’s fantastic, but I have a gazillion databases to restore!!! http://giftsforlearning.com/wp/tough-questions-with-no-good-answers-whats-a-parent-to-do/
  • 38. Dockerfile • Contains instructions (commands) to create an image • Each instruction creates a layer! • Automate builds using docker build • Dockerfile – no file extension docker build -t newimagename .
  • 39. Beware! • Be careful with creating too many (unnecessary?) instructions • Remember the layering? • Wrap the instructions into minimal layers / commits: Multiple Layer Image Simplified Image FROM microsoft/mssql-server-linux:latest WORKDIR /usr/src COPY ./shell /usr/src/sqlscript RUN chmod +x /usr/src/restoredb1.sh RUN chmod +x /usr/src/restoredb2.sh RUN chmod 755 /usr/src CMD /bin/bash ./entrypoint.sh FROM microsoft/mssql-server-linux:latest WORKDIR /usr/src COPY ./shell /usr/src RUN chmod +x /usr/src/restoredb1.sh && chmod +x /usr/src/restoredb2.sh && chmod 755 /usr/src CMD /bin/bash ./entrypoint.sh
  • 40. NOTE!! • Repository must be lowercase • docker build imagenamehere . • ENV attach_dbs doesn't work for Linux containers • Works on Windows containers • COPY and run .sql in shell (sh) scripts OR • sqlcmd CREATE DATABASE……FOR ATTACH • sqlservr.sh • opt/mssql/bin/sqlservr.sh doesn't exist anymore • opt/mssql/bin/sqlservr instead • If you don't then SQL Server won't start and no scripts can execute • Run something like /bin/bash script afterwards
  • 42. Image Sharing and Reuse • Export/Import (local) docker save --output= busybox.tar busybox docker load --input busybox.tar • DockerHub (cloud) • Commit a Container docker commit sqllinuxrestore sqllinuxrestore:v1 • Tag an Image docker tag sqllinuxrestore:v1 sqlgeordie/sqlrepository:sqllinuxrestore • Push to Docker Hub docker push sqlgeordie/sqlrepository:sqllinuxrestore
  • 43. Docker Hub - hub.docker.com
  • 45. Images and Tags Make sure you tag your images!
  • 46. Microsoft Images and Tags mssql-server-linux mssql-server-windows-developer mssql-server-windows-express 2017-latest 2017-CU1 latest 2017-GA 2017-latest latest 2017-GA 2017-CU1 2017 2017-windowsservercore-10.0.14393.1715 2016-sp1 2016-sp1-windowsservercore-10.0.14393.1715 2016-sp1-windowsservercore-10.0.14393.1480 2016-sp1-windowsservercore-10.0.14393.1198 2016-sp1-windowsservercore-10.0.14393.693 2017-latest latest 2017-GA 2017-CU1 2017-windowsservercore-10.0.14393.1715 2017 2016-sp1 2016-sp1-windowsservercore-10.0.14393.1715 2016-sp1-windowsservercore-10.0.14393.1480 2016-sp1-windowsservercore-10.0.14393.1198 2016-sp1-windowsservercore-10.0.14393.693 2016-windowsservercore-10.0.14393.447 2016 2016-sp1-windowsservercore-10.0.14393.447 *Notice there is nothing pre-2016, MSFT do not support these but there are some publicly available – see Andrew Pruski - https://hub.docker.com/u/dbafromthecold/
  • 48. Logs and Trouble Shooting • Limited monitoring out the box • Docker Knowledge Hub • docker logs <container_name> • Docker Cli logs • Could use TP tools • eg. SentryOne, cAdvisor (Google) https://docs.docker.com/docker-for-windows/troubleshoot/
  • 49. Docker-Compose(Multi-Container Applications) • docker-compose <build> • yml (YAML) files version: "3" services: web: build: . ports: - "8000:80" depends_on: - db db: image: "microsoft/mssql-server-linux" environment: SA_PASSWORD: "your_password" ACCEPT_EULA: "Y"
  • 50. Licensing (Docker) • Community Edition (CE) • Free! • Enterprise Edition (EE) • 3 Levels (Basic / Standard / Advanced) • $1500 - $3500 / Node / yr • EE Basic free for Windows Server 2016 customers https://www.docker.com/pricing
  • 51. Licensing (Windows) Production • Licensing is at the host level, • each machine or VM which is running Docker. • run any number of Windows Docker containers on that host. • Windows Server 2016 • support from Microsoft and Docker, Inc. Development • Docker for Windows runs on Windows 10 and is free, open- source software. • Docker for Windows can also run a Linux VM on your machine • Like the server version, run any number of Windows Docker containers. https://blog.docker.com/2017/01/docker-windows-server-image2docker/
  • 52. Licensing (SQL Server) • Licensing has not been finalised • Express and Developer Editions are free • Standard and Enterprise will have a cost • Think VM Licensing https://github.com/Microsoft/mssql-docker https://www.microsoft.com/en-us/sql-server/sql-server-2017-editions “Regardless of where you run it - VM, Docker, physical, cloud, on prem - the licensing model is the same and it depends on which edition of SQL Server you are using.”
  • 53. Performance • See link to Simon Sabin’s blog: • https://sabin.io/blog/sql-server-container-performance/ • Summary: • “The container seems a bit faster up to four users, but then trails off with the VM being faster later on.” • Expected the container to outperform the VM by a factor of 10-20%. • Difficult to draw any real conclusions. • Not enough reasons from a performance standpoint to recommend containers for database hosting in an enterprise environment.”
  • 54. Alternatives and TPVs • WinDocks • Allows images of older versions of SQL Server to be created • Portainer.io • GUI based tool • Kubernetes • Docker Swarm • Amazon Elastic Container Service (ECS) • Azure Container Service • Marathon • CoreOS Fleet • Open Stack Magnum • Diego • Hashicorp Nomad
  • 55. Conclusion Good • Docker provides a facility to quickly provision environments • Consolidation and space savings can be exceptional • Docker Hub has 1000’s of publicly available repositories / images Not so good • Storage fiddly / not user friendly • Lack of monitoring via Docker • TP tools available – cAdvisor • Platform Independency still in its infancy • Windows Docker Service
  • 56. Summary • Session Aim • What are containers? • Containers vs Virtual Machines • Images • Getting Setup • Volumes • Dockerfile • Docker Hub • Briefly: • Logs and troubleshooting • Multi-Container Applications • Licensing • Performance
  • 59. Links • SQL Server on Linux: • SQLPAL: https://blogs.technet.microsoft.com/dataplatforminsider/2016/12/16/sql-server-on- linux-how-introduction/ • • Getting Started: • Docker 101: https://www.slideshare.net/Docker/docker-101-nov-2016?next_slideshow=2Docker 101 - Nov 2016 • https://www.simple-talk.com/sysadmin/virtualization/working-windows-containers-docker- basics/ • • Simple Hello World on nanoserver: • https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/quick-start- windows-10 •
  • 60. Links • Introduction: • Docker introduction • General: • https://blog.sixeyed.com/windows-containers-and-docker-5-things-you-need-to-know/ • Licensing: • https://blog.docker.com/2017/01/docker-windows-server-image2docker/ • Installing: • https://mathaywardhill.com/2017/04/12/installing-sql-server-vnext-on-linux-using-docker- on-windows-10/ • SQL On Linux: • https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-docker • https://roadtoalm.com/2017/01/06/running-a-linux-sql-server-in-a-docker-container/ • Connecting to SQL via sqlcmd: • http://searchsqlserver.techtarget.com/tip/Use-these-commands-to-deploy-SQL-Server- Docker-containers
  • 61. Links • Nested Virtualisation (for VMs): • https://www.youtube.com/watch?v=ycCK1EyJG6Y (nested virtualisation) • Windocks: • https://www.windocks.com/blog-2/Windows-Containers-at-Work • Performance: • https://sabin.io/blog/sql-server-container-performance/ • https://facility9.com/2017/01/how-do-i-update-my-sql-server-docker-container/ • Error pushing image (add collaborators): • http://stackoverflow.com/questions/41984399/denied-requested-access-to-the-resource-is-denied- docker/42403423 • Terminology: • http://itproguru.com/expert/2016/10/docker-create-container-change-container-save-as-new-image-and-connect-to- container/ • Volumes: • http://paper.li/e-1483951345?read=https%3A%2F%2Fptop.only.wip.la%3A443%2Fhttp%2Fthedatafarm.com%2Fdata-access%2Fmashup-sql-server-on-linux-in- docker-on-a-mac-with-visual-studio-code%2F • http://www.tricksofthetrades.net/2016/03/14/docker-data-volumes/ • https://www.richard-banks.org/2017/03/connecting-to-sql-on-docker.html
  • 62. Links • Hyper-V containers: • https://www.simple-talk.com/sysadmin/virtualization/working-windows-containers-docker- stride/?utm_source=simpletalk&utm_medium=pubemail&utm_content=20170512- slota2&utm_term=simpletalkmain • https://hyper-v.nu/archives/hvredevoort/2015/05/nested-hypervisor-in-windows-server- vnext/ • https://blogs.technet.microsoft.com/uktechnet/2016/01/11/windows-containers-what-they- are-and-how-they-work/ • Windows Server and Docker - The Internals Behind Bringing Docker and Containers to Windows by Taylor Brown and John Starks • Tutorials: • Docker Container Tutorial #1 Containers vs Images - Focuses on Ubuntu • Learn Docker in 12 Minutes 🐳 • Learn Docker in 20 Minutes