1. Docker - Get started
Basic concepts
Reference from Docker Official
2. - What’s Docker ?
- Why Docker?
- Image & Container
- VMs vs Container
- Dockerfile ?
Table of contents
2. Use cases
- Deploy environment
- Scalable system
- Distribution system
3. Examples
- Build base PHP
development
environment
- Full stack deploy
DEV -> TEST ->
PROD
1. Concept
3. Docker allows you to package an application with all of its dependencies into a
standardized unit for software development
● Features:
- Own process space
- Own network interface
- Can run stuff as root
- Can have its own /sbin/init
- Chroot-jail environment -> Isolated processes
- Shared OS with host
=> Lightweight + Open + Secure
What’s Docker ?
4. + Lightweight
+ Open
+ Secure
+ Scalable
+ Copying/Moving
● Run anywhere
- Linux
- Windows
- Unix
● Run anything
- Webapps
- Backend
- SQL, NoSQL
- Bigdata
- Message queue … and more
=> Scalable + Multi distribution system
Why Docker ?
6. ● An Image is software you load into a
container
- Pre-build
- Inheritable
- Simply configure
● A Container is a stripped-to-basics version
of a Linux operating system
=> Similar definition of Class (Image) &
Object (Container) in OOP
Images & Containers ?
Image
container container container
8. FROM ubuntu # pull (inherit) from ubuntu kernel
RUN apt-get update && apt-get install -y apache2
php5 libapache2-mod-php5 # install new package
EXPOSE 80 # open port 80
CMD [‘service’, ‘apache2’, ‘start’] # run apache2
Dockerfile example
Your Image
container container container
Ubuntu
9.
10. - What’s Docker ?
- Why Docker?
- Image & Container
- VMs vs Container
- Dockerfile ?
Table of contents
2. Use cases
- Deploy environment
- Scalable system
- Distribution system
3. Examples
- Build base PHP
development
environment
- Full stack deploy
DEV -> TEST ->
PROD
1. Concept
11. Dev Environment & Scalable System
Base PHP
container
container
container
Base Kernel
Base MySQL Base Django
container
container
DB
12.
13. - What’s Docker ?
- Why Docker?
- Image & Container
- VMs vs Container
- Dockerfile ?
Table of contents
2. Use cases
- Deploy environment
- Scalable system
- Distribution system
3. Examples
- Build base PHP
development
environment
- Full stack deploy
DEV -> TEST ->
PROD
1. Concept