5. What’s the problem?
I am only in charge of some services
Too many dependencies
Not easy to setup development env in minutes
Not easy test before commit codes
As a developer
6. Develop with an alpha Env
API
Gateway
service 1rest
service 2rest
service 3rest
service 4rest
service 5rest
Web UI Database
message bus
What you really care
7. What you might do
develop commit
deploy to
alpha
test with
other services
take long time
develop
test with with
mocked data
OR
commit deploy
not precise
9. Ease to setup development env in minutes
Using Docker for development
Having a consistent env for testing at local
Ease to swap components
10. Using Docker for development
API
Gateway
service 1rest
service 2rest
service 3rest
service 4rest
service 5rest
Web UI Database
message bus
version 1container container
container
container
container
container container
container
container
branch a
branch b
local codes
12. Packing container image for development
docker file
app config
build
build script
image
source
Linked using volume
local storage
mount volume
building codes
running app
booting container
13. Using Docker-compose to run all
version: 3
services:
service1:
build: .
depends_on:
- redis
ports:
- “80:80”
service2:
image: “service2:branch_a”
redis:
image: redis
service 1 service 2
Redis
docker-compose.yml
after running “docker-compose up”
14. Using smaller base images
Avoid installing unnecessary packages
One concern for one container
Tag version with git information for dev image
Tips