1. Dockerize Your Project!
Improve your project development workflow with
docker and docker-compose
git/twitter @imrenagi
Docker Community Leader, Indonesia
3. Outline
Docker Basic
What is Docker / What is Docker Not
Basic Docker Commands
Dockerfiles
Docker Compose
What is Docker Compose
Docker-compose.yml
Demo & Hands On
Develop multi-service app (tweet live
sentiment analytics)
Q&A
5. Docker containers are not VMs
● Easy connection to make
● Fundamentally different architectures
● Fundamentally different benefits
6. Some Docker Vocabularies
Docker Image
The basis of a Docker container. Represents a full application
Docker Container
The standard unit in which the application service resides and executes
Registry Service (Docker Hub or Docker Trusted Registry)
Cloud or server based storage and distribution service for your images
7. What is a container?
● Standardized packaging
for software and
dependencies
● Isolate apps from each
other
● Share the same OS kernel
● Works for all major Linux
distributions
8. Why dockerize your project?
● Best developer reason -> “it doesn’t work on my machine!”
● Reduce time for project setup in local development environment
● Make deployment to cloud platform (AWS, GCP, Azure) easy!
9. Dockerfile
● Instructions on how to
build a Docker image
● Looks very similar to
“native” commands
● Important to optimize
your Dockerfile
11. Docker compose is a tool for creating and managing
multi container applications
Docker Compose: Multi Container Applications
● Containers are all defined in a single file called docker-compose.yml
● Each container runs a particular component/service of your application. For
example:
○ Web frontend
○ User authentication
○ Payments gateway
○ Database
● Compose will spin up all of your containers in a single command
12. ● Build and run one container at a
time
● Manually connect container
together
● Must be careful with dependencies
and start up order
Docker Compose: Multi Container Applications
● Define multi container app in
compose.yml file
● Single command to deploy entire app
● Handle container dependencies
● Works with Docker Swarm, Networking,
Volumes
● Easy to migrate the application to
Kubernetes
16. Real-time twitter sentiment analytics
Requirements:
● Read live stream tweet from twitter stream API
● Determine the sentiment of a tweet (positive, negative, or neutral)
● Show the number of tweet based on its sentiment in frontend web application
via web browser
Context:
● Imagine we are working on a big company consists of several teams, in
where each small team is responsible to maintain a particular service
● Microservices??