ALTERNATE UNIVERSE DEV

CodingBlocks

80. Docker for Developers

This episode we’re talking about server naming conventions, confusing command line arguments, and how high we can get our voices. Huge thanks to the NSA and the freedom of information act for making this episode possible.

Sponsors

Survey Says

In the spirit of this episode, we ask: Do you use Docker in your current dev life?

Anonymous Vote
Sign in with Wordpress
Do you use Docker in your current dev life?
  • Yes, so I can install and remove software while keeping my system clean.
  • Yes, it's part of my build chain.
  • Yes, it's part of my production deployment.
  • Just testing
  • Ain't nobody got time for that.
  • Anytime, I can hear Michael's voice, would be awesome!!!
  • Once a week, around an hour time frame.
  • Keep the current release cycle, address simple questions with a 5-10 minute segment per episode, dedicate longer episodes as to questions as needed.
  • A 1 hour show once per week would be nice. Any shorter and things often start to feel rushed or superficial.
  • every 2 weeks, 45-1 hour. perfect.
  • 1 a week 1 hour long, sweet jesus
  • ~50 minutes once a week would be nice. .NET Rocks are around that length and I love them.
  • I think the best podcast length is likely equivalent to the mean commute time (~25-30 minutes). Twice a week would be great because it is easier to carry a thread. Also, I think the audience begins to forget your exist if they are released only every few weeks.
  • How about 30 minute weeklies and 90 minutes monthlies
  • I don't have time for 10 minute shows. 30 minutes is my cutoff. If a podcast is less than 30 minutes long I usually don't bother playing it because it's distracting to navigate to a different podcast. Considering I often listen in my car, at the gym, or while doing other things with my hands I don't like short podcasts. And besides podcasts are not television, who wants to be reminded of the crappy experience television provides making you reach for the remote every 10 minutes because of commercials.
  • Once a week but 30 mins is not enough to get into a topic. Officially I vote 1/week but if you have to go to every 2 or 3 weeks to have enough time to fully cover a topic I'd prefer that. Thanks guys, regardless of when you do it!!!!
  • 1 hour once per 5-10 days
  • If possible I would like to hear 2 shows a week around 30 minutes in length
  • bool isListenersHappy = (minutesPerShow == 60 && nrOfTimesPerWeek >= 1);
  • All of the above.. I want more!!!. You guys rock!
  • Twice a week. Each podcast is about 1 hour long.

News

  • Big thanks to everyone that left a review:
    • iTunes: NMarcora, skalleluia, I’m not sure how I got here, Sapphira80
    • Stitcher: Ivan the Terrible, StickersPlease, ColumFerry, samantha______
  • We rounded up some familiar names from the Slack community for our very first Community Talks to discuss Over Architecture. – YouTube

The Rise of DevOps and Containers

The Rise of DevOps

  • In the beginning…there were servers
  • They were expensive, and complicated. You’d have to get sign off from account and give them cool names
  • That was too slow, so we started buying bigger servers and provisioning VMs for what we needed
    • VM’s were great, but a lot of time they wouldn’t be fully utilized, and they were cost prohibitive
  • That was too wasteful, so we started renting them and this eventually became known as the cloud
  • However, life did not get any easier. Companies just wanted more and more done, faster and faster!
  • IaaS spawned PaaS spawned SaaS
  • None of these fully replaced what came before, they added to the complexity!

Then everything exploded! Just kidding

  • Luckily for us, programmers are a smart bunch – we developed tools and techniques to manage this complexity
  • As the cloud was maturing, so was the idea of DevOps
  • “The main characteristic of the DevOps movement is to strongly advocate automation and monitoring at all steps of software construction, from integration, testing, releasing to deployment and infrastructure management” (Wikipedia)
  • Programmers working with (probably?) the most complex architectures in the world attacked this problem from 2 sides:
    • Complex orchestration tools that were able to manage their environments faster and more efficiently than humans ever could
    • Standardized and Simplified deliverables, modular components that can be deployed and scaled independently
  • A lot of this same power is available to you, right now, even if you’re not working at one of the big 10!
  • But…if I’m not working at Google, why should I care?
  • Lets forget about orchestration then, and focus on simplifying our deliverables

Containers are really cool….

  • We’re not going to dive too deep because we’re focusing on the developer experience
  • Main Point: they simplify development, deployment, and orchestration – after you get the ball rolling
  • Get 2/3 the benefit, even if you aren’t working at Google scale

What are containers

  • High Level: Standardized and Simplified deliverables, modular and disposable components that can be deployed and scaled independently
    • Possible because they are ephemeral
  • We don’t want to get bogged down into the details of what containers are, or how they work but we do want to hit a couple highlights:
    • Docker != Containers: Similar notions have been around for ages, like…going back to 1979: https://blog.aquasec.com/a-brief-history-of-containers-from-1970s-chroot-to-docker-2016
    • Containers != VMs: The most notable difference is that VMs have their own operating system, making them big and clunky
    • For most developers, you can think of a container like a portable shipping container that holds your application and lets you treat it as a single modular unit
  • Can you imagine building a VM in a CI pipeline?
    • Spinning one up to deploy our software, run tests, then copying it up to the cloud for every deploy?
    • How do you manage orchestration? One app per VM?
    • Nobody wants to run a VM locally!

What is Docker?

  • Docker is an ecosystem
    • It’s a company
    • It’s command line tools for creating images and containers
    • It’s command line tools for orchestration via docker-compose and swarm, kubernetes, etc.
    • It’s DockerHub – container management platform like NPM or Nuget
    • It’s…really easy?
  • So when we say Docker…we mean all of that 🙂
  • Runs just about anywhere, including Windows* (7+, x64 architecture, with Hardware Virtualization Technology enabled)

Dev Workflow

  • Somebody sets up containers for your applications
  • You can spin up your apps and services with one command
  • Changes are a bit tricker…
    • Ideally you’ll use the build tools inside the container so…how do you build?
      • Mapped volumes let you create magical folders on your computer, that show up inside the container
    • 4 Solutions, and they all involve mapping volumes
      1. Use a technology that doesn’t require building
      2. Set up a watcher, to automatically rebuild when changes are made
      3. Run the command in the container (docker exec or you keep an active terminal)
      4. Kill the app container (just the one)

Why you should care, even if you’re not working at Google

  • Simplify onboarding
    • Eliminate or Reduce complex server setups
    • No more tool/version problems
  • Eliminate App Conflicts
    • Download isolated versions of your entire architecture
  • Environmental Consistency
    • Eliminate whole class of problems
    • Less surprises
  • Easier == Faster
    • Simplify, Predictability, Consistency, Cloud is Cake!

Lightning Round: Opinionated questions:

  • Is Docker the new git? (i.e. a ubiquitous solution that every dev is expected to be familiar with.)
  • How deep do “normal” devs need to go with containers and docker?
  • Docker for junior devs?
  • When is the appropriate time to introduce Docker? (Am I too late?)
  • When is Docker not appropriate?
  • Does Docker live up to the marketing?

Resources We Like

Tip of the Week

  • Right click on the element and select Force state, such as :hover, in Chrome Dev Tools (thank you to everyone that responded with this answer based on episode 79’s discussion). – Stack Overflow
  • Use git commit –amend –no-edit to add that file you forgot to include in that last commit. That and 4 other Git commands you’ll find helpful. – Netguru
  • Stefan Scherer provides you with all of the Windows based Docker containers you could possibly want to use as your next building blocks. – Docker, GitHub
  • Visual Studio understands Docker. Take advantage of it.
  • Use ligatures in your IDE with fonts like FiraCode (GitHub). (Thanks @madvikinggod)

Episode source