How to Dockerize a PHP application
PHP Conference Asia 2016
Kai Hendry
Kai Hendry
2.5 hrs of knowledge transfer
1. Intro - ~30mins
2. We do a Docker tutorial together ~1hr
3. We try Dockerize your stuff ~1hr
4. BONUS: AWS ECS zero downtime
Ask me questions at any time!
Docker doings:
A defacto standard in the world of containers built by the company dotCloud in
Golang leveraging LXC technology.
What is a container? A running image. Docker has a powerful image layering concept and a push/pull image store.
Why not use LXC? Docker provides a nice user interface.
Is it secure?
docker
run
upstream/service
Actually usually you need to compose
your containers
1. git
push
2. travis builds and uploads image to ECR
3. Update docker-compose.yml
with image id
4. ecs-cli compose service up
OR
1. docker build -t myapp .
2. docker push myapp:id
3. Update docker-compose.yml
with image id
4. ecs-cli compose service up