﻿<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
	<channel>
		<title>T.J. Brown</title>
		<link>http://satjbrownblog.z13.web.core.windows.net/</link>
		<description>Welcome!</description>
		<copyright>2020</copyright>
		<pubDate>Wed, 24 Jun 2020 19:51:15 GMT</pubDate>
		<lastBuildDate>Wed, 24 Jun 2020 19:51:15 GMT</lastBuildDate>
		<item>
			<title>Setting up a SQL Server Development Environment with Docker Containers - Part 2 - The Basics</title>
			<link>http://satjbrownblog.z13.web.core.windows.net/posts/docker-sql-dev-2.html</link>
			<description>&lt;p&gt;This is continued from &lt;a href="/posts/docker-sql-dev-2"&gt;Part 1 - Introduction&lt;/a&gt;&lt;/p&gt;</description>
			<guid>http://satjbrownblog.z13.web.core.windows.net/posts/docker-sql-dev-2.html</guid>
			<pubDate>Thu, 16 Apr 2020 00:00:00 GMT</pubDate>
			<content:encoded>&lt;p&gt;This is continued from &lt;a href="/posts/docker-sql-dev-2"&gt;Part 1 - Introduction&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="the-basics"&gt;The Basics&lt;/h2&gt;
&lt;p&gt;The first step in learning any new technology is naturally to Google/Bing furiously and begin reading everything you can. I began my journey at the Docker website where I installed Docker Desktop and worked through some of the samples&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.docker.com/101-tutorial"&gt;Docker 101 Link&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="basic-docker-commands"&gt;Basic Docker Commands&lt;/h3&gt;
&lt;p&gt;Here are some basic commands you should learn. I'll add more details and links to the documentation below.&lt;/p&gt;
&lt;p&gt;View Running Containers. The -a or --all tag will view all containers, whether they're running or not.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker ps (-a)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Pull a Container Image&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker pull ImageUrl
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Start an existing Container&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker start ContainerName
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Stop a Container&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker stop ContainerName
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Run a new container from a container image&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker run ImageName
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Build a new container image&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker build (-t) .
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;These last two remove data so be careful!&lt;/p&gt;
&lt;p&gt;Remove a container&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker rm ContainerName
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Remove an image&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker image rm ImageName
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Remove all ununsed containers, networks, and images (both dangling and unreferenced)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker system prune
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;During my experiments I had plenty of times where I created a new container that immediately exited. You'll need to develop the ability to troubleshoot your unexpected container exits.&lt;/p&gt;
&lt;p&gt;To find an exit code for a stopped container, use:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker inspect 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;From there, you'll need to use that exit code to gather more information.&lt;/p&gt;
&lt;p&gt;Here's a list of some &lt;a href="https://medium.com/better-programming/understanding-docker-container-exit-codes-5ee79a1d58f6"&gt;Common Docker Exit Codes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Continue this series in &lt;a href="/posts/docker-sql-dev-3"&gt;Part 3 - Building Your First SQL Server Docker Container&lt;/a&gt;.&lt;/p&gt;
</content:encoded>
		</item>
		<item>
			<title>Setting up a SQL Server Development Environment with Docker Containers - Part 1</title>
			<link>http://satjbrownblog.z13.web.core.windows.net/posts/docker-sql-dev-1.html</link>
			<description>&lt;p&gt;I recently received a new work machine and decided that I no longer wanted any bare metal database installs on my system. I'd prefer not to even have any local VMs. My new approach will be purely Azure VMs, plus local containers.&lt;/p&gt;</description>
			<guid>http://satjbrownblog.z13.web.core.windows.net/posts/docker-sql-dev-1.html</guid>
			<pubDate>Thu, 16 Apr 2020 00:00:00 GMT</pubDate>
			<content:encoded>&lt;h2 id="part-1-introduction"&gt;Part 1 - Introduction&lt;/h2&gt;
&lt;h3 id="prologue"&gt;Prologue&lt;/h3&gt;
&lt;p&gt;I recently received a new work machine and decided that I no longer wanted any bare metal database installs on my system. I'd prefer not to even have any local VMs. My new approach will be purely Azure VMs, plus local containers.&lt;/p&gt;
&lt;h3 id="what-are-docker-containers-anyway"&gt;What are Docker Containers anyway?&lt;/h3&gt;
&lt;p&gt;From the Docker website:&lt;/p&gt;
&lt;blockquote class="blockquote"&gt;
&lt;p&gt;A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="https://www.docker.com/sites/default/files/d8/styles/large/public/2018-11/container-what-is-container.png?itok=vle7kjDj" class="img-fluid" alt="ContainerImage" /&gt;&lt;/p&gt;
&lt;p&gt;So about those 5 VMs on your machine that are taking a giant amount of space?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do you really need 5 OS installations for that?&lt;/li&gt;
&lt;li&gt;How much RAM are we wasting on OS overhead?&lt;/li&gt;
&lt;li&gt;Wouldn't it be great if all 5 could share the same resources for the OS?&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote class="blockquote"&gt;
&lt;p&gt;Docker Model vs VM Model
&lt;img src="https://www.docker.com/sites/default/files/d8/2018-11/docker-containerized-and-vm-transparent-bg.png" class="img-fluid" alt="ContainerAndVM" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In short, VMs virtualize hardware, and then we can install our software and dependencies on those VMs. Docker uses a difference approach. It virualizes &lt;em&gt;software&lt;/em&gt;. Specifically, it virtualizes the OS. Docker Container images then define instructions for loading dependencies and software for a container. Those images can be instantiated at runtime to create immutable container instance.&lt;/p&gt;
&lt;p&gt;Not only are containers very lightweight compared to VMs, but a container also contains its dependencies, eliminating the common problem of software having different runtime experiences on different machines. &amp;quot;It worked on my machine?&amp;quot; - no more. When moving a container from one container host to another of the same OS kernel, it should always work because all dependencies are contained within the container.&lt;/p&gt;
&lt;p&gt;Continue this series in &lt;a href="/posts/docker-sql-dev-2"&gt;Part 2 - The Basics&lt;/a&gt;&lt;/p&gt;
</content:encoded>
		</item>
		<item>
			<title>A New Blog</title>
			<link>http://satjbrownblog.z13.web.core.windows.net/posts/a-new-blog.html</link>
			<description>&lt;p&gt;Welcome to my new blog. The creation of this blog is long overdue. I've long found maintaining a blog a cumbersome activity but am excited to start a new beginning.&lt;/p&gt;</description>
			<guid>http://satjbrownblog.z13.web.core.windows.net/posts/a-new-blog.html</guid>
			<pubDate>Fri, 03 Apr 2020 00:00:00 GMT</pubDate>
			<content:encoded>&lt;h1 id="a-new-blog"&gt;A New Blog&lt;/h1&gt;
&lt;p&gt;Welcome to my new blog. The creation of this blog is long overdue. I've long found maintaining a blog a cumbersome activity but am excited to start a new beginning.&lt;/p&gt;
&lt;p&gt;For this new chapter, I did a lot of research on different CMS systems. In the end, I've decided to abandand CMS systems all together and instead opt for a static site generator. I chose this for a few reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;I believe this will be a better writing experiece for my content creation. Working with Markdown files is a much better experience than logging into a CMS system or working on a third party client. Also, it is fast! A better writing experience means that I'll be likely to write more.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Having blog posts defined as Markdown files is mobile and offline friendly, further enhancing the writing experience. Wyam is getting migrated to a new static site generator, Statiq. Its nice to have the migration be relatively painless.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Having my blogs in Markdown files will make any transition to a new static generator a very easy migration experience.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance! Static websites a fast. This wll be a better user experience for my readers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Wyam is based on .NET Core, a technology I'm somewhat familiar with, but not an expert in. I want more experience with .NET and this seems like the perfect opportunity. (I have no interest in creating Wordpress modules.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using Azure Storage with Static Websites will significantly reduce my overhead costs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Having all my costs in a single Azure subscription will simplify my online expenses.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I'll be doing future blog posts on the technology that I'm using for this blog, including Wyam (a .NET static site generator), Azure Blob Storage, Azure Domain Services, Azure CDN, and Azure Pipelines. For now, I'll leave some links that helped in the creation of this site.&lt;/p&gt;
&lt;h3 id="links"&gt;Links&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=G_gDYlRBAZw"&gt;Scott Hanselman: A Static Website as cheaply as possible with Azure Storage, Azure CDN, HTTPS and a Custom Domain&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=_xSD4wO2dqw&amp;amp;t=3s"&gt;Frank Boucher: Getting Ready for a Continuous Integration, Continuous Deployment of a Static Website - Part 1 of 3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=ylqeogadFyE"&gt;DevChatter: Static Site Generation using Wyam.io with guest Dave Glick! Episode 56!&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded>
		</item>
	</channel>
</rss>