SlideShare a Scribd company logo
Common Docker Problems
and Solutions
Joel Chen
LinkedIn: http://lnkd.in/bwwnBWR
GitHub: https://github.com/joelchen
Stability: Problems
š Memory leak:
$ free -h
total used free shared buffers cached
Mem: 995M 961M 33M 480K 57M 252M
-/+ buffers/cache: 961M 0M
Swap: 1.0G 1.0G 0M
š Dependencies not included in official Docker images (e.g. OpenJDK missing
libfontconfig1: https://github.com/docker-library/openjdk/issues/46)
š Filesystem error: create/symlink failed, no inodes free
Stability: Solutions
š Prevent problems by logging, monitoring, and testing
š Prevent multiple containers from using the same port
š Upgrade to latest version of Docker
š File issue in the official Docker image repository in GitHub, and other issue trackers related
to the problem
š Use workaround until issue is resolved (e.g. older version of official Docker image with
dependencies included)
š Select a stable storage driver and filesystem
Stability: Solutions
https://docs.docker.com/engine/userguide/storagedriver/selectadriver/
Security: Problems
š Common security concerns (exploits, attacks, threats)
š Sharing secrets using environment variables (exposed in many places)
š In Docker 1.7 and below, Docker is vulnerable to image forgery and replay attacks
š In Docker 1.9 and below, processes running as root (UID 0) in a container has root-level
privileges on the underlying host when interacting with the kernel
š Vulnerable Docker images
Security: Problems
Official Images with Vulnerabilities General Images with Vulnerabilities
http://www.banyanops.com/blog/analyzing-docker-hub/
Security: Solutions
š Security practices (encryption, monitoring, access control, inbound/outbound filtering, logging,
backup, patching, verifying authenticity, policy, training)
š Pass secrets in volumes, or in key-value stores (etcd, Vault, Keywhiz)
š Mount the container's root filesystem as read only whenever possible (mount tmpfs directories if
required)
docker run -d --read-only --tmpfs /run --tmpfs /tmp IMAGE
š Upgrade to latest version of Docker (Docker 1.8 introduced Docker Content Trust, and Docker
1.10 introduced Seccomp Profiles, User Namespaces, Authorization Plugins)
š Use and periodically update to the latest version of images
š Use minimal base images (scratch, busybox, alpine) and USER instruction to build custom
Docker images whenever possible
š Security tools, especially Docker Bench for Security (https://dockerbench.com/), and others
(https://www.alfresco.com/blogs/devops/2015/12/03/docker-security-tools-audit-and-
vulnerability-assessment/)
Thank You
Joel Chen
LinkedIn: http://lnkd.in/bwwnBWR
GitHub: https://github.com/joelchen

More Related Content

What's hot (20)

PPT
Linux Kernel Development
Priyank Kapadia
 
PDF
Introduction to FreeNAS development by John Hixson
iXsystems
 
PPTX
Introduce to linux
Shamimul Alam
 
PDF
Nelf2012
Dru Lavigne
 
PDF
SELF 2014: PBI v10: Application Management Made Easy
Ken Moore
 
PDF
Posscon2013
Dru Lavigne
 
ODP
OpenEmbedded
Scott Garman
 
PDF
Sweden11
Dru Lavigne
 
PDF
Course 101: Lecture 6: Installing Ubuntu
Ahmed El-Arabawy
 
PDF
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
Ahmed El-Arabawy
 
PDF
Embedded Systems: Lecture 6: Linux & GNU
Ahmed El-Arabawy
 
PDF
Course 102: Lecture 16: Process Management (Part 2)
Ahmed El-Arabawy
 
PDF
How to be a distribution-friendly project
Donnie Berkholz
 
PDF
Linux kernel modules
Eddy Reyes
 
PDF
BSD for Linux Users
Dru Lavigne
 
PDF
Gentoo Linux, or Why in the World You Should Compile Everything
Donnie Berkholz
 
PPTX
Device drivers Introduction
vijay selva
 
PDF
Scale13
Dru Lavigne
 
PDF
Linux systems - Linux Commands and Shell Scripting
Emertxe Information Technologies Pvt Ltd
 
PPT
Seven problems of Linux Containers
Kirill Kolyshkin
 
Linux Kernel Development
Priyank Kapadia
 
Introduction to FreeNAS development by John Hixson
iXsystems
 
Introduce to linux
Shamimul Alam
 
Nelf2012
Dru Lavigne
 
SELF 2014: PBI v10: Application Management Made Easy
Ken Moore
 
Posscon2013
Dru Lavigne
 
OpenEmbedded
Scott Garman
 
Sweden11
Dru Lavigne
 
Course 101: Lecture 6: Installing Ubuntu
Ahmed El-Arabawy
 
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
Ahmed El-Arabawy
 
Embedded Systems: Lecture 6: Linux & GNU
Ahmed El-Arabawy
 
Course 102: Lecture 16: Process Management (Part 2)
Ahmed El-Arabawy
 
How to be a distribution-friendly project
Donnie Berkholz
 
Linux kernel modules
Eddy Reyes
 
BSD for Linux Users
Dru Lavigne
 
Gentoo Linux, or Why in the World You Should Compile Everything
Donnie Berkholz
 
Device drivers Introduction
vijay selva
 
Scale13
Dru Lavigne
 
Linux systems - Linux Commands and Shell Scripting
Emertxe Information Technologies Pvt Ltd
 
Seven problems of Linux Containers
Kirill Kolyshkin
 

Similar to Common Docker Problems and Solutions (20)

PDF
Dockers & kubernetes detailed - Beginners to Geek
wiTTyMinds1
 
PDF
Docker security
Janos Suto
 
PPTX
Docker Security and Orchestration for DevSecOps wins
Sharath Kumar
 
PDF
Docker, Linux Containers, and Security: Does It Add Up?
Jérôme Petazzoni
 
PDF
Securité des container
Rachid Zarouali
 
PPTX
"Docker best practice", Станислав Коленкин (senior devops, DataArt)
DataArt
 
PDF
The Challenges of Container Configuration
Gareth Rushgrove
 
PDF
Troubleshooting Tips from a Docker Support Engineer
Jeff Anderson
 
PDF
Troubleshooting Tips from a Docker Support Engineer - Jeff Anderson, Docker
Docker, Inc.
 
PDF
Real-World Docker: 10 Things We've Learned
RightScale
 
PDF
How Secure Is Your Container? ContainerCon Berlin 2016
Phil Estes
 
PPTX
Docker and the Container Ecosystem
psconnolly
 
PDF
Docker, Linux Containers (LXC), and security
Jérôme Petazzoni
 
PDF
Boycott Docker
Paolo Tonin
 
PDF
Docker: do's and don'ts
Paolo Tonin
 
PDF
How to swim with a whale
Łukasz Siudut
 
PDF
Docker London: Container Security
Phil Estes
 
PPTX
Docker Security Overview
Sreenivas Makam
 
PDF
Docker_AGH_v0.1.3
Witold 'Ficio' Kopel
 
PDF
Data Science Workflows using Docker Containers
Aly Sivji
 
Dockers & kubernetes detailed - Beginners to Geek
wiTTyMinds1
 
Docker security
Janos Suto
 
Docker Security and Orchestration for DevSecOps wins
Sharath Kumar
 
Docker, Linux Containers, and Security: Does It Add Up?
Jérôme Petazzoni
 
Securité des container
Rachid Zarouali
 
"Docker best practice", Станислав Коленкин (senior devops, DataArt)
DataArt
 
The Challenges of Container Configuration
Gareth Rushgrove
 
Troubleshooting Tips from a Docker Support Engineer
Jeff Anderson
 
Troubleshooting Tips from a Docker Support Engineer - Jeff Anderson, Docker
Docker, Inc.
 
Real-World Docker: 10 Things We've Learned
RightScale
 
How Secure Is Your Container? ContainerCon Berlin 2016
Phil Estes
 
Docker and the Container Ecosystem
psconnolly
 
Docker, Linux Containers (LXC), and security
Jérôme Petazzoni
 
Boycott Docker
Paolo Tonin
 
Docker: do's and don'ts
Paolo Tonin
 
How to swim with a whale
Łukasz Siudut
 
Docker London: Container Security
Phil Estes
 
Docker Security Overview
Sreenivas Makam
 
Docker_AGH_v0.1.3
Witold 'Ficio' Kopel
 
Data Science Workflows using Docker Containers
Aly Sivji
 
Ad

Recently uploaded (20)

PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
July Patch Tuesday
Ivanti
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Ad

Common Docker Problems and Solutions

  • 1. Common Docker Problems and Solutions Joel Chen LinkedIn: http://lnkd.in/bwwnBWR GitHub: https://github.com/joelchen
  • 2. Stability: Problems š Memory leak: $ free -h total used free shared buffers cached Mem: 995M 961M 33M 480K 57M 252M -/+ buffers/cache: 961M 0M Swap: 1.0G 1.0G 0M š Dependencies not included in official Docker images (e.g. OpenJDK missing libfontconfig1: https://github.com/docker-library/openjdk/issues/46) š Filesystem error: create/symlink failed, no inodes free
  • 3. Stability: Solutions š Prevent problems by logging, monitoring, and testing š Prevent multiple containers from using the same port š Upgrade to latest version of Docker š File issue in the official Docker image repository in GitHub, and other issue trackers related to the problem š Use workaround until issue is resolved (e.g. older version of official Docker image with dependencies included) š Select a stable storage driver and filesystem
  • 5. Security: Problems š Common security concerns (exploits, attacks, threats) š Sharing secrets using environment variables (exposed in many places) š In Docker 1.7 and below, Docker is vulnerable to image forgery and replay attacks š In Docker 1.9 and below, processes running as root (UID 0) in a container has root-level privileges on the underlying host when interacting with the kernel š Vulnerable Docker images
  • 6. Security: Problems Official Images with Vulnerabilities General Images with Vulnerabilities http://www.banyanops.com/blog/analyzing-docker-hub/
  • 7. Security: Solutions š Security practices (encryption, monitoring, access control, inbound/outbound filtering, logging, backup, patching, verifying authenticity, policy, training) š Pass secrets in volumes, or in key-value stores (etcd, Vault, Keywhiz) š Mount the container's root filesystem as read only whenever possible (mount tmpfs directories if required) docker run -d --read-only --tmpfs /run --tmpfs /tmp IMAGE š Upgrade to latest version of Docker (Docker 1.8 introduced Docker Content Trust, and Docker 1.10 introduced Seccomp Profiles, User Namespaces, Authorization Plugins) š Use and periodically update to the latest version of images š Use minimal base images (scratch, busybox, alpine) and USER instruction to build custom Docker images whenever possible š Security tools, especially Docker Bench for Security (https://dockerbench.com/), and others (https://www.alfresco.com/blogs/devops/2015/12/03/docker-security-tools-audit-and- vulnerability-assessment/)
  • 8. Thank You Joel Chen LinkedIn: http://lnkd.in/bwwnBWR GitHub: https://github.com/joelchen