Docker at Shopify 
From This-Looks-Fun to Production
Simon Eskildsen 
Infrastructure @ Shopify 
@Sirupsen
Shopiscale 
• 200-300K RPM during day, > 500K during large sales 
• ~100 large metal servers running containers 
• 100+ product developers, ~10 infrastructure, ~10 core ops 
• 10 year old monolith 
• Ruby on Rails, MySQL, Redis, memcached, ..
Make it easier to 
solve problems at 
Shopify
Container 
------- 
Platform
Timeline to production 
• Mid 2013. Investigated Mesos and Docker 
• Winter 2014 Legwork for containerization, failed attempt to 
deploy Mesos 
• Spring 2014 Containerization work and no success with 
CoreOS either 
• Summer 2014 Pivot to Chef, runit and Capistrano. !'ed it
Ship Docker as the only 
change
Successfully shipping Docker 
1. Play 
2. Prepare 
3. Containerize 
4. Feature
1. Play stage 
• Develop feel for Docker 
• Study namespaces, companies, cgroups, .. 
• Prototyping 
• Don't get stuck or starstruck
2. Preparation stage 
• Secrets (github.com/Shopify/ejson) 
• Assets 
• Logs 
• Graceful shutdown 
• Monitoring 
• Roles/Procfile 
• Containerization patterns
3. Containerization stage 
• Don't add new features to your infrastructure 
• Building images/CI/dev 
• Deployment 
• Static orchestration 
• Union filesystems 
• init in container, Linux namespaces, cgroups, routing, 
monitoring, security updates, registry..
4. Feature stage ! 
• Buttons 
• Distributed orchestration 
• Service discovery 
• Routing 
• CoreOS 
• PaaS 
• ..
Verschlimmbesserung
What we took to 
production
Image Builds
Image builder 
1. Commit <sha> lands in master 
2. Build server builds image for new SHA (~2m) 
3. Pushed to internal registry: registry.shopify.com/ 
shopify:<sha>
We don't use Dockerfiles
Builder API 
• script/prepare System-level packages or other infrequent 
changes on top of base image. 
• script/build Frequently changed dependencies, run on 
every build. 
• config/roles.json Roles for the application, our 
Procfile.
Final image for Shopify 
Ubuntu 
---------------- 
Baseimage (750 MiB) 
================ 
`script/prepare` (100MiB) 
---------------- 
`script/build`: Start of week (800MiB) 
---------------- 
`script/build`: Start of day (100MiB) 
----------------- 
`script/build`: Current commit (80MiB)
container "shopify" do 
role :web 
instances 5 
health_check true 
http_health_check "/ping/ponies" 
revision "file" 
env({ 
RAILS_ENV: "production", 
UNICORN_WORKERS: node[:cores] / 5 
}) 
end 
Turns into supervisor scripts: 
docker run -e CONTAINER=1 -e HOST_IP=172.16.1.227  
-e ENV=production -e PORT=20003  
-e APP_HEALTH_CHECK=/ping/ponies  
-e ENDPOINT=172.16.1.227:20003 -e UNICORN_WORKERS=5  
-e NODENAME=borg-shopify-unicorn-4.omgweb.dc.shopify.com  
--volume=/tmp/borg-run/keys/11607:/key  
--cidfile=/tmp/borg-run/keys/11607/cidfile  
--name="borg-shopify-unicorn-4-$$"  
--net=host internal.registry.com/shopify:$(cat /etc/borg/shopify/current) web
Deploys 
1. Deploy two stacks at once. 
2. Capistrano updates revision in /etc/shopify/revision. 
3. ls -d /etc/sv/shopify-web* | xargs -L1 sudo sv 
restart 
• Restart ~20% of containers at a time.
Containers are the future, 
but it's still hard in 
production
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shopify)
Simon Eskildsen, Infrastructure @ Shopify 
@Sirupsen
Thank You.
Staircase Tutorial, Andreas Leversa (https://creativecommons.org/licenses/by/2.0/) 
Sandbox, Kate Mereand-Sinha (https://creativecommons.org/licenses/by/2.0/) 
Panama canal construction photo, World Bank Photo Collection (https://creativecommons.org/licenses/by-nc-nd/2.0/) 
Other pictures used by permissions of Florian Weingarten 
Flight of the Unicorns, Eric Wagner (https://creativecommons.org/licenses/by-nc-sa/2.0/) 
Container, Izabela Reimers (https://creativecommons.org/licenses/by-nc-sa/2.0/) 
Sam Satch, Chinese Ornamental Chilli Sprouting (https://creativecommons.org/licenses/by-nd/2.0/) 
Anvil & Hammer, Brad Knabel (https://creativecommons.org/licenses/by-nc-nd/2.0/) 
Matt Kowal, DIY Darkroom - Alternative Process (https://creativecommons.org/licenses/by-sa/2.0/) 
Over-stuffed Walrus picture kindly provided with permission by the Horniman Museum and Gardens, U.K. 
Video of me in walrus costume, Lily Rogers and Emma Craig
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shopify)

More Related Content

PDF
Clocker - The Docker Cloud Maker
PPTX
Scaling Development Environments with Docker
PDF
Container Days Boston - Kubernetes in production
PDF
Kubernetes Boston — Custom High Availability of Kubernetes
PDF
Beyond static configuration
PPTX
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
PPTX
Kubernetes HA @ AppDirect - Montreal Kubernetes Meetup
PPTX
Scaling Docker Containers using Kubernetes and Azure Container Service
Clocker - The Docker Cloud Maker
Scaling Development Environments with Docker
Container Days Boston - Kubernetes in production
Kubernetes Boston — Custom High Availability of Kubernetes
Beyond static configuration
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Kubernetes HA @ AppDirect - Montreal Kubernetes Meetup
Scaling Docker Containers using Kubernetes and Azure Container Service

What's hot (20)

PDF
fabric8 ... and Docker, Kubernetes & OpenShift
PDF
Achieving CI/CD with Kubernetes
KEY
Play Support in Cloud Foundry
PDF
runC: The little engine that could (run Docker containers) by Docker Captain ...
PPTX
Thinking Inside the Container: A Continuous Delivery Story by Maxfield Stewart
PDF
[OpenInfra Days Korea 2018] Day 2 - E5-1: "Invited Talk: Kubicorn - Building ...
PDF
TIAD : Automating the aplication lifecycle
PDF
Building Web Scale Apps with Docker and Mesos by Alex Rukletsov (Mesosphere)
PDF
Cloning Running Servers with Docker and CRIU by Ross Boucher
PPTX
Hashicorp: Delivering the Tao of DevOps
PDF
Kube-AWS
PDF
Docker up and running
PDF
Micro services infrastructure with AWS and Ansible
PPTX
Docker, Mesos, Spark
PDF
An Introduction to the Kubernetes API
PPTX
Docker and kubernetes
PDF
Container orchestration
PDF
Docker serverless v1.0
PPTX
Dockerizing Windows Server Applications by Ender Barillas and Taylor Brown
PPTX
Bitbucket Pipelines - Powered by Kubernetes
fabric8 ... and Docker, Kubernetes & OpenShift
Achieving CI/CD with Kubernetes
Play Support in Cloud Foundry
runC: The little engine that could (run Docker containers) by Docker Captain ...
Thinking Inside the Container: A Continuous Delivery Story by Maxfield Stewart
[OpenInfra Days Korea 2018] Day 2 - E5-1: "Invited Talk: Kubicorn - Building ...
TIAD : Automating the aplication lifecycle
Building Web Scale Apps with Docker and Mesos by Alex Rukletsov (Mesosphere)
Cloning Running Servers with Docker and CRIU by Ross Boucher
Hashicorp: Delivering the Tao of DevOps
Kube-AWS
Docker up and running
Micro services infrastructure with AWS and Ansible
Docker, Mesos, Spark
An Introduction to the Kubernetes API
Docker and kubernetes
Container orchestration
Docker serverless v1.0
Dockerizing Windows Server Applications by Ender Barillas and Taylor Brown
Bitbucket Pipelines - Powered by Kubernetes
Ad

Viewers also liked (20)

PPTX
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
PDF
Clocker: Managing Container Networking and Placement
PDF
Docker and Radio Astronomy - Containing Fragile Scientific Software by Gijs M...
PPTX
Opinionated containers and the future of game servers by Brendan Fosberry
PPTX
Migrating a large code-base to containers by Doug Johnson and Jonathan Lozins...
PPTX
Enable Fig to deploy to multiple Docker servers by Willy Kuo
PDF
DockerCon SF 2015: Ben Golub's Keynote Day 1
PDF
Open Design at large scale by Solomon Hykes
PDF
Evaluating and ranking genome assemblers by Michael Barton (Joint Genome Inst...
PPTX
DockerCon 15 Keynote - Day 2
PDF
DockerCon SF 2015: Keynote Day 1
PPTX
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
PDF
DockerCon SF 2015: AWS w/ Deepak Singh
PDF
DockerCon SF 2015: Resilient Routing and Discovery
PPTX
BBC: CI Problems and our Solutions by Simon Thulbourn
PPTX
A new model for Docker image distribution
PPTX
Revamping Development and Testing Using Docker – Transforming Enterprise IT b...
PDF
Docker Compose by Aanand Prasad
PDF
Docker Registry V2
PDF
Docker 101: Introduction to Docker
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Clocker: Managing Container Networking and Placement
Docker and Radio Astronomy - Containing Fragile Scientific Software by Gijs M...
Opinionated containers and the future of game servers by Brendan Fosberry
Migrating a large code-base to containers by Doug Johnson and Jonathan Lozins...
Enable Fig to deploy to multiple Docker servers by Willy Kuo
DockerCon SF 2015: Ben Golub's Keynote Day 1
Open Design at large scale by Solomon Hykes
Evaluating and ranking genome assemblers by Michael Barton (Joint Genome Inst...
DockerCon 15 Keynote - Day 2
DockerCon SF 2015: Keynote Day 1
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
DockerCon SF 2015: AWS w/ Deepak Singh
DockerCon SF 2015: Resilient Routing and Discovery
BBC: CI Problems and our Solutions by Simon Thulbourn
A new model for Docker image distribution
Revamping Development and Testing Using Docker – Transforming Enterprise IT b...
Docker Compose by Aanand Prasad
Docker Registry V2
Docker 101: Introduction to Docker
Ad

Similar to Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shopify) (20)

PDF
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
PPTX
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
KEY
Wider than rails
PDF
ITB2017 - Keynote
PDF
Advanced technic for OS upgrading in 3 minutes
PDF
(2018) Webpack Encore - Asset Management for the rest of us
PDF
Kuby, ActiveDeployment for Rails Apps
PPT
Ruby on Rails workshop for beginner
KEY
Ship It ! with Ruby/ Rails Ecosystem
PDF
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
PDF
Exploring MySQL Operator for Kubernetes in Python
PDF
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
PDF
Container Native Development Tools - Talk by Mickey Boxell
PDF
How Shopify Scales Rails
KEY
Handling Redis failover with ZooKeeper
PPT
Build Automation of PHP Applications
KEY
Rails 3.1
PDF
MySQL on Docker and Kubernetes
PDF
Docker Advanced registry usage
PDF
Ruby on Rails Kickstart 101 & 102
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
Wider than rails
ITB2017 - Keynote
Advanced technic for OS upgrading in 3 minutes
(2018) Webpack Encore - Asset Management for the rest of us
Kuby, ActiveDeployment for Rails Apps
Ruby on Rails workshop for beginner
Ship It ! with Ruby/ Rails Ecosystem
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Exploring MySQL Operator for Kubernetes in Python
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
Container Native Development Tools - Talk by Mickey Boxell
How Shopify Scales Rails
Handling Redis failover with ZooKeeper
Build Automation of PHP Applications
Rails 3.1
MySQL on Docker and Kubernetes
Docker Advanced registry usage
Ruby on Rails Kickstart 101 & 102

More from Docker, Inc. (20)

PDF
Containerize Your Game Server for the Best Multiplayer Experience
PDF
How to Improve Your Image Builds Using Advance Docker Build
PDF
Build & Deploy Multi-Container Applications to AWS
PDF
Securing Your Containerized Applications with NGINX
PDF
How To Build and Run Node Apps with Docker and Compose
PDF
Hands-on Helm
PDF
Distributed Deep Learning with Docker at Salesforce
PDF
The First 10M Pulls: Building The Official Curl Image for Docker Hub
PDF
Monitoring in a Microservices World
PDF
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
PDF
Predicting Space Weather with Docker
PDF
Become a Docker Power User With Microsoft Visual Studio Code
PDF
How to Use Mirroring and Caching to Optimize your Container Registry
PDF
Monolithic to Microservices + Docker = SDLC on Steroids!
PDF
Kubernetes at Datadog Scale
PDF
Labels, Labels, Labels
PDF
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
PDF
Build & Deploy Multi-Container Applications to AWS
PDF
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
PDF
Developing with Docker for the Arm Architecture
Containerize Your Game Server for the Best Multiplayer Experience
How to Improve Your Image Builds Using Advance Docker Build
Build & Deploy Multi-Container Applications to AWS
Securing Your Containerized Applications with NGINX
How To Build and Run Node Apps with Docker and Compose
Hands-on Helm
Distributed Deep Learning with Docker at Salesforce
The First 10M Pulls: Building The Official Curl Image for Docker Hub
Monitoring in a Microservices World
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
Predicting Space Weather with Docker
Become a Docker Power User With Microsoft Visual Studio Code
How to Use Mirroring and Caching to Optimize your Container Registry
Monolithic to Microservices + Docker = SDLC on Steroids!
Kubernetes at Datadog Scale
Labels, Labels, Labels
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Build & Deploy Multi-Container Applications to AWS
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
Developing with Docker for the Arm Architecture

Recently uploaded (20)

PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
UiPath Agentic Automation session 1: RPA to Agents
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PPT
Geologic Time for studying geology for geologist
PDF
Five Habits of High-Impact Board Members
PDF
sbt 2.0: go big (Scala Days 2025 edition)
DOCX
search engine optimization ppt fir known well about this
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PPTX
Training Program for knowledge in solar cell and solar industry
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
OpenACC and Open Hackathons Monthly Highlights July 2025
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
UiPath Agentic Automation session 1: RPA to Agents
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
Basics of Cloud Computing - Cloud Ecosystem
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
NewMind AI Weekly Chronicles – August ’25 Week IV
Geologic Time for studying geology for geologist
Five Habits of High-Impact Board Members
sbt 2.0: go big (Scala Days 2025 edition)
search engine optimization ppt fir known well about this
Consumable AI The What, Why & How for Small Teams.pdf
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Early detection and classification of bone marrow changes in lumbar vertebrae...
The influence of sentiment analysis in enhancing early warning system model f...
Improvisation in detection of pomegranate leaf disease using transfer learni...
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Training Program for knowledge in solar cell and solar industry

Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shopify)

  • 1. Docker at Shopify From This-Looks-Fun to Production
  • 2. Simon Eskildsen Infrastructure @ Shopify @Sirupsen
  • 3. Shopiscale • 200-300K RPM during day, > 500K during large sales • ~100 large metal servers running containers • 100+ product developers, ~10 infrastructure, ~10 core ops • 10 year old monolith • Ruby on Rails, MySQL, Redis, memcached, ..
  • 4. Make it easier to solve problems at Shopify
  • 6. Timeline to production • Mid 2013. Investigated Mesos and Docker • Winter 2014 Legwork for containerization, failed attempt to deploy Mesos • Spring 2014 Containerization work and no success with CoreOS either • Summer 2014 Pivot to Chef, runit and Capistrano. !'ed it
  • 7. Ship Docker as the only change
  • 8. Successfully shipping Docker 1. Play 2. Prepare 3. Containerize 4. Feature
  • 9. 1. Play stage • Develop feel for Docker • Study namespaces, companies, cgroups, .. • Prototyping • Don't get stuck or starstruck
  • 10. 2. Preparation stage • Secrets (github.com/Shopify/ejson) • Assets • Logs • Graceful shutdown • Monitoring • Roles/Procfile • Containerization patterns
  • 11. 3. Containerization stage • Don't add new features to your infrastructure • Building images/CI/dev • Deployment • Static orchestration • Union filesystems • init in container, Linux namespaces, cgroups, routing, monitoring, security updates, registry..
  • 12. 4. Feature stage ! • Buttons • Distributed orchestration • Service discovery • Routing • CoreOS • PaaS • ..
  • 14. What we took to production
  • 16. Image builder 1. Commit <sha> lands in master 2. Build server builds image for new SHA (~2m) 3. Pushed to internal registry: registry.shopify.com/ shopify:<sha>
  • 17. We don't use Dockerfiles
  • 18. Builder API • script/prepare System-level packages or other infrequent changes on top of base image. • script/build Frequently changed dependencies, run on every build. • config/roles.json Roles for the application, our Procfile.
  • 19. Final image for Shopify Ubuntu ---------------- Baseimage (750 MiB) ================ `script/prepare` (100MiB) ---------------- `script/build`: Start of week (800MiB) ---------------- `script/build`: Start of day (100MiB) ----------------- `script/build`: Current commit (80MiB)
  • 20. container "shopify" do role :web instances 5 health_check true http_health_check "/ping/ponies" revision "file" env({ RAILS_ENV: "production", UNICORN_WORKERS: node[:cores] / 5 }) end Turns into supervisor scripts: docker run -e CONTAINER=1 -e HOST_IP=172.16.1.227 -e ENV=production -e PORT=20003 -e APP_HEALTH_CHECK=/ping/ponies -e ENDPOINT=172.16.1.227:20003 -e UNICORN_WORKERS=5 -e NODENAME=borg-shopify-unicorn-4.omgweb.dc.shopify.com --volume=/tmp/borg-run/keys/11607:/key --cidfile=/tmp/borg-run/keys/11607/cidfile --name="borg-shopify-unicorn-4-$$" --net=host internal.registry.com/shopify:$(cat /etc/borg/shopify/current) web
  • 21. Deploys 1. Deploy two stacks at once. 2. Capistrano updates revision in /etc/shopify/revision. 3. ls -d /etc/sv/shopify-web* | xargs -L1 sudo sv restart • Restart ~20% of containers at a time.
  • 22. Containers are the future, but it's still hard in production
  • 24. Simon Eskildsen, Infrastructure @ Shopify @Sirupsen
  • 26. Staircase Tutorial, Andreas Leversa (https://creativecommons.org/licenses/by/2.0/) Sandbox, Kate Mereand-Sinha (https://creativecommons.org/licenses/by/2.0/) Panama canal construction photo, World Bank Photo Collection (https://creativecommons.org/licenses/by-nc-nd/2.0/) Other pictures used by permissions of Florian Weingarten Flight of the Unicorns, Eric Wagner (https://creativecommons.org/licenses/by-nc-sa/2.0/) Container, Izabela Reimers (https://creativecommons.org/licenses/by-nc-sa/2.0/) Sam Satch, Chinese Ornamental Chilli Sprouting (https://creativecommons.org/licenses/by-nd/2.0/) Anvil & Hammer, Brad Knabel (https://creativecommons.org/licenses/by-nc-nd/2.0/) Matt Kowal, DIY Darkroom - Alternative Process (https://creativecommons.org/licenses/by-sa/2.0/) Over-stuffed Walrus picture kindly provided with permission by the Horniman Museum and Gardens, U.K. Video of me in walrus costume, Lily Rogers and Emma Craig