DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • Testcontainers: From Zero To Hero [Video]
  • Java High Availability With WildFly on Kubernetes
  • Five Can’t-Miss Sessions from DevOps World | Jenkins World 2018
  • Deploy a Session Recording Solution Using Ansible and Audit Your Bastion Host

Trending

  • Automated Testing Lifecycle
  • TDD With FastAPI Is Easy
  • LTS JDK 21 Features
  • Automated Testing: The Missing Piece of Your CI/CD Puzzle
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. 5 Real-World Docker Tips From OSCON’s Most Popular Session

5 Real-World Docker Tips From OSCON’s Most Popular Session

OSCON 2015 was great, and taught these 5 real-world tips for using Docker.

Fredric Paul user avatar by
Fredric Paul
·
Aug. 14, 15 · Analysis
Like (2)
Save
Tweet
Share
2.22K Views

Join the DZone community and get the full member experience.

Join For Free

If there was one session that demonstrated the intense interest in Docker and containers in general at last month’s OSCON in Portland, it had to be Bridget Kromhout’s Docker in Production: Reality, Not Hype. The session was standing room only, and latecomers were being pushed out the door. It was so popular that the OSCON organizers asked Bridget to repeat her session the next day.

No wonder. Docker is hot, hot, hot, and Bridget brings deep experience with DevOps and containerization: She is an operations engineer, blogger, presenter, co-organizer of Minneapolis DevOps Days, and co-host of the Arrested DevOps podcast.

Bridget’s company, DramaFever, has been running Docker in production since October 2013, back when the Docker website clearly warned: “Don’t use this in production!” DramaFever streams videos, having begun with Korean soap operas, and now offers additional video services including docclub.com and shudder.com. It has 15,000 episodes from 70 content providers and reaches 20 million viewers. At peak load, the company handles tens of thousands of requests per second from a variety of different endpoints; viewers often switch devices in the middle of a program.

To make sure its infrastructure could support all that and provide a good user experience, DramaFever broke up its single, monolithic Python app into microservices. The team runs services in Amazon Web Services, uses Python for the main DramaFever website, and Go for microservices. DramaFever relies on Docker to provide a consistent development environment and repeatable deployment.

Along the way, Bridget and her team learned a number of lessons about using Docker in production. Here are five key ones that she shared in her OSCON session:

1. Beware Registry Overload

Docker didn’t have a private registry when DramaFever started its container adventure, but they wouldn’t have been comfortable with the registry being on Docker as a “not-controlled-by-us” single-point-of-failure anyway. So DramaFever relied on a single registry server on its Jenkins instance—but when more than 20 or so instances came up, the registry would fail. Now, DramaFever runs a private registry container backed by AWS S3 storage on every Amazon Elastic Compute Cloud (EC2) instance (and laptop!) that’s going to use Docker. This solution doesn’t require many resources, and helps deal with the scaling problem.

2. Build Your Base

To make sure the base Docker image is up-to-date, DramaFever’s ops team runs weekly “base builds.” These builds include infrequently changing dependencies, such as Ubuntu packages and Python requirements files, and so on. Other builds start from these base images, and therefore run faster.

3. Prevent Drunk Pushing

No humans have the credentials to issue the “docker push” command to production. These command come only from the Jenkins server. This rule prevents anyone from doing an ill-advised push at an hour when no one else is around.

4. Clean Up!

Containers and images can consume a lot of disk space. If the root of your Docker source repository fills up, “very, very bad things can happen, including bizarre disk corruption,” Bridget explained. She advised running a daily script to remove stopped containers and images tagged “none.”

5. Watch Your Time

S3 really cares about your system clock. Unfortunately, boot2docker—an application that lets you run Docker on Windows and MacOS—will stop if your laptop goes to sleep, which skews the clock in the virtual machine. Any requests to the AWS API will result in a RequestTimeTooSkewed error. To deal with this problem, all the DramaFever utilities sourced by all the wrapper scripts include this line of code:

boot2docker ssh sudo date --set \"$(env TZ=UTC date '+%F %H:%M:%S')\"

This is a known problem, and boot2docker is working on a fix.

Bridget’s perspective is super valuable for anyone considering running Docker in production. You can view the slides of the OSCON session and read the blog post that it’s based upon.

The most important takeaway, though, is that while Docker may be great, it’s not magic. Containers offer some really cool and compelling advantages, but like any new technology, Docker requires due diligence to make sure it will work and meet your needs in your specific environment.

[This article was written by Tori Wieldt]

Docker (software) Session (web analytics)

Published at DZone with permission of Fredric Paul, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Testcontainers: From Zero To Hero [Video]
  • Java High Availability With WildFly on Kubernetes
  • Five Can’t-Miss Sessions from DevOps World | Jenkins World 2018
  • Deploy a Session Recording Solution Using Ansible and Audit Your Bastion Host

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: