SlideShare a Scribd company logo
1 of 17
Download to read offline
OverlayFS as a
Docker Storage Driver
Tomoya Akase
Index
• OverlayFS

• Docker Storage Driver

• OverlayFS, as a Docker Storage Driver

• Conclusion
OverlayFS
What is OverlayFS?
• OverlayFS is implementation of Union File System

• OverlayFS stacks multiple Directory/Files to construct one
directory tree, and it can save volumes
• OverlayFS is composed of three layers
Reference: https://www.datalight.com/blog/2016/01/27/explaining-overlayfs-%E2%80%93-what-it-does-and-how-it-works/
Three Layers of OverlayFS
• Lower is R/O layer

• Upper is R/W layer

• Overlay merge Lower and Upper, and you can handle data
without being aware of layers
Lower Upper Overlay
OverlayFS, as a FileSystem
• File Read: Read from top (if no it exist, read from bottom)

• File Write(if exist Upper): normal write

• File Write(if exist only Lower): Copy file into Upper
Lower Upper Overlay
Read
Read
Lower Upper Overlay
Write
Copy
Read Write
Write
OverlayFS, as a FileSystem
• File Remove: if it exist on Lower, overlay will create
whiteout file
• If you just delete file exist on Upper, you can read the file
from Lower
Lower Upper Overlay
Remove
Remove
Lower Upper Overlay
Can not ReadRemove
whiteout file
Create
Can not Read
Demo
gist: https://gist.github.com/esakat/78d57ca31b34a3d39b176b655f575a30
Docker Storage Driver
Background of Docker Storage Driver
• Docker consists of Image and Container

• Image is a bundle of R/O layers

• Container is a bundle of Image and thin R/W layers on
Image
Dockerfile
Image
R/O layer
FROM ubuntu:latest
COPY ./sample.sh /
RUN apt-get update..
RUN curl https://go..
Container
R/O layer
FROM ubuntu:latest
COPY ./sample.sh /
RUN apt-get update..
RUN curl https://go..
R/W layer
Build Run
What is Docker Storage Driver?
• Docker Storage Driver stacks these layers to make them
appear single
Reference: https://docs.docker.com/v17.09/engine/userguide/storagedriver/imagesandcontainers/
Why Docker Storage Driver is used?
• R/O Files should share with others (same as Union FS
philosophy)
Reference: https://docs.docker.com/v17.09/engine/userguide/storagedriver/imagesandcontainers/
OverlayFS, as a Docker Storage Driver
OverlayFS, as a Docker Storage Driver
• Docker Storage Driver itself is like Union FS

• It has many implementation (overlay2, aufs,
devicemapper, btrfs, and etc...), overlay is one of them

• Docker official site recommend overlay2 driver

• overlay2 can use multiple lower (overlay can only use
one lower)
Reference: https://docs.docker.com/storage/storagedriver/select-storage-driver/
Conclusion
Conclusion
• OverlayFS is an File System consisting of R/O
layer(Lower), R/W layer(Upper), and an Overlay layer
merge Lower and Upper, which can save volumes

• Docker uses Image as R/O layer(Lower) and Container
as stack(Overlay) of Image and R/W layer(Upper), which
can save volumes
References
• shttps://www.slideshare.net/akachochin/overlayfsa-brief-report-of-overlayfs-
source-code-reading

• https://docs.docker.com/storage/storagedriver/overlayfs-driver/

• https://blog.tiqwab.com/2017/02/18/docker-technology.html

• https://qiita.com/fireowl11/items/d1cf03aff691f9c0eff9

• https://qiita.com/awakia/items/af9b46c322905cdce1d7

• http://gihyo.jp/admin/serial/01/linux_containers/0018?page=3

• https://docs.docker.com/storage/storagedriver/

• http://docs.docker.jp/engine/userguide/storagedriver/imagesandcontainers.html

More Related Content

What's hot

Docker introduction
Docker introductionDocker introduction
Docker introductionPhuc Nguyen
 
Docker Registry V2
Docker Registry V2Docker Registry V2
Docker Registry V2Docker, Inc.
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT CampusAjeet Singh Raina
 
Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker, Inc.
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Herofazalraja
 
Docker multi-stage build
Docker multi-stage buildDocker multi-stage build
Docker multi-stage buildAlexei Ledenev
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)Gourav Varma
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxThe Linux Foundation
 
DCEU 18: Dockerfile Best Practices
DCEU 18: Dockerfile Best PracticesDCEU 18: Dockerfile Best Practices
DCEU 18: Dockerfile Best PracticesDocker, Inc.
 
containerd the universal container runtime
containerd the universal container runtimecontainerd the universal container runtime
containerd the universal container runtimeDocker, Inc.
 
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy PullingFaster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy PullingKohei Tokunaga
 
Devops Devops Devops, at Froscon
Devops Devops Devops, at FrosconDevops Devops Devops, at Froscon
Devops Devops Devops, at FrosconKris Buytaert
 
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화OpenStack Korea Community
 
Linux power management: are you doing it right?
Linux power management: are you doing it right?Linux power management: are you doing it right?
Linux power management: are you doing it right?Chris Simmonds
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CDHoang Le
 

What's hot (20)

Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Docker Registry V2
Docker Registry V2Docker Registry V2
Docker Registry V2
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
 
Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Hero
 
Linux: LVM
Linux: LVMLinux: LVM
Linux: LVM
 
Docker multi-stage build
Docker multi-stage buildDocker multi-stage build
Docker multi-stage build
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
 
DCEU 18: Dockerfile Best Practices
DCEU 18: Dockerfile Best PracticesDCEU 18: Dockerfile Best Practices
DCEU 18: Dockerfile Best Practices
 
containerd the universal container runtime
containerd the universal container runtimecontainerd the universal container runtime
containerd the universal container runtime
 
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy PullingFaster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
 
Docker
DockerDocker
Docker
 
Devops Devops Devops, at Froscon
Devops Devops Devops, at FrosconDevops Devops Devops, at Froscon
Devops Devops Devops, at Froscon
 
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Linux power management: are you doing it right?
Linux power management: are you doing it right?Linux power management: are you doing it right?
Linux power management: are you doing it right?
 
Helm 3
Helm 3Helm 3
Helm 3
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CD
 

Similar to OverlayFS as a Docker Storage Driver

Root file system for embedded systems
Root file system for embedded systemsRoot file system for embedded systems
Root file system for embedded systemsalok pal
 
Using ACFS as a Storage for EBS
Using ACFS as a Storage for EBSUsing ACFS as a Storage for EBS
Using ACFS as a Storage for EBSAndrejs Karpovs
 
New Oracle Infrastructure2
New Oracle Infrastructure2New Oracle Infrastructure2
New Oracle Infrastructure2markleeuw
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with DockerRavindu Fernando
 
Raspberry pi introduction
Raspberry pi introductionRaspberry pi introduction
Raspberry pi introductionLusiana Diyan
 
Disks and-filesystems
Disks and-filesystemsDisks and-filesystems
Disks and-filesystemsplarsen67
 
Disks and-filesystems
Disks and-filesystemsDisks and-filesystems
Disks and-filesystemsplarsen67
 
AWS re:Invent 2016: Deep Dive on Amazon Elastic File System (STG202)
AWS re:Invent 2016: Deep Dive on Amazon Elastic File System (STG202)AWS re:Invent 2016: Deep Dive on Amazon Elastic File System (STG202)
AWS re:Invent 2016: Deep Dive on Amazon Elastic File System (STG202)Amazon Web Services
 
Getting started-with-zend-framework
Getting started-with-zend-frameworkGetting started-with-zend-framework
Getting started-with-zend-frameworkMarcelo da Rocha
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerHiroki Endo
 
dylibencapsulation
dylibencapsulationdylibencapsulation
dylibencapsulationCole Herzog
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerWalid Ashraf
 
Oracle Database on Docker - Best Practices
Oracle Database on Docker - Best PracticesOracle Database on Docker - Best Practices
Oracle Database on Docker - Best Practicesgvenzl
 
Command Line Tools
Command Line ToolsCommand Line Tools
Command Line ToolsDavid Harris
 

Similar to OverlayFS as a Docker Storage Driver (20)

Root file system for embedded systems
Root file system for embedded systemsRoot file system for embedded systems
Root file system for embedded systems
 
Using ACFS as a Storage for EBS
Using ACFS as a Storage for EBSUsing ACFS as a Storage for EBS
Using ACFS as a Storage for EBS
 
Edubooktraining
EdubooktrainingEdubooktraining
Edubooktraining
 
New Oracle Infrastructure2
New Oracle Infrastructure2New Oracle Infrastructure2
New Oracle Infrastructure2
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with Docker
 
Raspberry pi introduction
Raspberry pi introductionRaspberry pi introduction
Raspberry pi introduction
 
AHUG Presentation: Fun with Hadoop File Systems
AHUG Presentation: Fun with Hadoop File SystemsAHUG Presentation: Fun with Hadoop File Systems
AHUG Presentation: Fun with Hadoop File Systems
 
Disks and-filesystems
Disks and-filesystemsDisks and-filesystems
Disks and-filesystems
 
Disks and-filesystems
Disks and-filesystemsDisks and-filesystems
Disks and-filesystems
 
Linux
LinuxLinux
Linux
 
Docker Overview
Docker OverviewDocker Overview
Docker Overview
 
AWS re:Invent 2016: Deep Dive on Amazon Elastic File System (STG202)
AWS re:Invent 2016: Deep Dive on Amazon Elastic File System (STG202)AWS re:Invent 2016: Deep Dive on Amazon Elastic File System (STG202)
AWS re:Invent 2016: Deep Dive on Amazon Elastic File System (STG202)
 
Getting started-with-zend-framework
Getting started-with-zend-frameworkGetting started-with-zend-framework
Getting started-with-zend-framework
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
dylibencapsulation
dylibencapsulationdylibencapsulation
dylibencapsulation
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Oracle Database on Docker - Best Practices
Oracle Database on Docker - Best PracticesOracle Database on Docker - Best Practices
Oracle Database on Docker - Best Practices
 
Command Line Tools
Command Line ToolsCommand Line Tools
Command Line Tools
 
Sahul
SahulSahul
Sahul
 
Sahul
SahulSahul
Sahul
 

Recently uploaded

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

OverlayFS as a Docker Storage Driver

  • 1. OverlayFS as a Docker Storage Driver Tomoya Akase
  • 2. Index • OverlayFS • Docker Storage Driver • OverlayFS, as a Docker Storage Driver • Conclusion
  • 4. What is OverlayFS? • OverlayFS is implementation of Union File System • OverlayFS stacks multiple Directory/Files to construct one directory tree, and it can save volumes • OverlayFS is composed of three layers Reference: https://www.datalight.com/blog/2016/01/27/explaining-overlayfs-%E2%80%93-what-it-does-and-how-it-works/
  • 5. Three Layers of OverlayFS • Lower is R/O layer • Upper is R/W layer • Overlay merge Lower and Upper, and you can handle data without being aware of layers Lower Upper Overlay
  • 6. OverlayFS, as a FileSystem • File Read: Read from top (if no it exist, read from bottom) • File Write(if exist Upper): normal write • File Write(if exist only Lower): Copy file into Upper Lower Upper Overlay Read Read Lower Upper Overlay Write Copy Read Write Write
  • 7. OverlayFS, as a FileSystem • File Remove: if it exist on Lower, overlay will create whiteout file • If you just delete file exist on Upper, you can read the file from Lower Lower Upper Overlay Remove Remove Lower Upper Overlay Can not ReadRemove whiteout file Create Can not Read
  • 10. Background of Docker Storage Driver • Docker consists of Image and Container • Image is a bundle of R/O layers • Container is a bundle of Image and thin R/W layers on Image Dockerfile Image R/O layer FROM ubuntu:latest COPY ./sample.sh / RUN apt-get update.. RUN curl https://go.. Container R/O layer FROM ubuntu:latest COPY ./sample.sh / RUN apt-get update.. RUN curl https://go.. R/W layer Build Run
  • 11. What is Docker Storage Driver? • Docker Storage Driver stacks these layers to make them appear single Reference: https://docs.docker.com/v17.09/engine/userguide/storagedriver/imagesandcontainers/
  • 12. Why Docker Storage Driver is used? • R/O Files should share with others (same as Union FS philosophy) Reference: https://docs.docker.com/v17.09/engine/userguide/storagedriver/imagesandcontainers/
  • 13. OverlayFS, as a Docker Storage Driver
  • 14. OverlayFS, as a Docker Storage Driver • Docker Storage Driver itself is like Union FS • It has many implementation (overlay2, aufs, devicemapper, btrfs, and etc...), overlay is one of them • Docker official site recommend overlay2 driver • overlay2 can use multiple lower (overlay can only use one lower) Reference: https://docs.docker.com/storage/storagedriver/select-storage-driver/
  • 16. Conclusion • OverlayFS is an File System consisting of R/O layer(Lower), R/W layer(Upper), and an Overlay layer merge Lower and Upper, which can save volumes • Docker uses Image as R/O layer(Lower) and Container as stack(Overlay) of Image and R/W layer(Upper), which can save volumes
  • 17. References • shttps://www.slideshare.net/akachochin/overlayfsa-brief-report-of-overlayfs- source-code-reading • https://docs.docker.com/storage/storagedriver/overlayfs-driver/ • https://blog.tiqwab.com/2017/02/18/docker-technology.html • https://qiita.com/fireowl11/items/d1cf03aff691f9c0eff9 • https://qiita.com/awakia/items/af9b46c322905cdce1d7 • http://gihyo.jp/admin/serial/01/linux_containers/0018?page=3 • https://docs.docker.com/storage/storagedriver/ • http://docs.docker.jp/engine/userguide/storagedriver/imagesandcontainers.html