Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Docker: multi-stage multi-environment
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Abdala Cerqueira
August 31, 2018
Technology
0
380
Docker: multi-stage multi-environment
Talk given on Unconference Track in LaraconEU 2018
Abdala Cerqueira
August 31, 2018
Tweet
Share
More Decks by Abdala Cerqueira
See All by Abdala Cerqueira
Docker: multi-stage and multi-environment
abdala
3
700
Programação também é mágica
abdala
0
160
Websockets e você, tudo a ver
abdala
1
130
PHP em todos os lugares
abdala
1
140
Automatizado rotinas com sua linguagem favorita
abdala
0
100
PHPUnit, ele irá te salvar!
abdala
0
93
Presente! Software Livre
abdala
0
75
Other Decks in Technology
See All in Technology
【2026年版】生成AIによる情報システムへのインパクト
taka_aki
0
190
大規模な組織におけるAI Agent活用の促進と課題
lycorptech_jp
PRO
5
6.8k
OCI技術資料 : 外部接続 VPN接続 詳細
ocise
1
10k
競争優位を生み出す戦略的内製開発の実践技法
masuda220
PRO
2
500
AI活用を"目的"にしたら、データの本質が見えてきた - Snowflake Intelligence実験記 / chasing-ai-finding-data
pei0804
0
820
AWS Bedrock Guardrails / 機密情報の入力・出力をブロックする — Blocking Sensitive Information Input/Output
kazuhitonakayama
2
180
Eight Engineering Unit 紹介資料
sansan33
PRO
1
6.8k
作るべきものと向き合う - ecspresso 8年間の開発史から学ぶ技術選定 / 技術選定con findy 2026
fujiwara3
6
1.6k
WBCの解説は生成AIにやらせよう - 生成AIで野球解説者AI Agentを実現する / Baseball Commentator AI Agent for Gemini
shinyorke
PRO
0
300
2026-02-25 Tokyo dbt meetup プロダクトと融合したCI/CD で実現する、堅牢なデータパイプラインの作り方
y_ken
0
150
男(監査)はつらいよ - Policy as CodeからAIエージェントへ
ken5scal
4
660
AI が Approve する開発フロー / How AI Reviewers Accelerate Our Development
zaimy
1
230
Featured
See All Featured
Paper Plane
katiecoart
PRO
0
47k
Building Adaptive Systems
keathley
44
2.9k
Scaling GitHub
holman
464
140k
Color Theory Basics | Prateek | Gurzu
gurzu
0
220
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
370
Code Review Best Practice
trishagee
74
20k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
90
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
What's in a price? How to price your products and services
michaelherold
247
13k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
First, design no harm
axbom
PRO
2
1.1k
Transcript
Docker: Multi-stage multi-environment Abdala Cerqueira
Dockerfile
FROM COPY --from= docker build --target
Problems
Problem 1 • Keep different Dockerfiles per environment • !
dev tools and dependencies on production
Problem 2 • Big, huge, immense images • One or
two commands may leave images out of control
Dependencies
Checklist • Have only one Dockerfile • Use the same
Dockerfile for all environments (dev, test, prod) • Create small images • Manage less dependencies
Official PHP image • One Dockerfile • All environments •
Small images • Less dependencies Time: ~39s Size: 430MB Security problems
Multi-stage
Official PHP image multi-stage • One Dockerfile • All environments
• Small images • Less dependencies Time: ~40s Size: 393MB Not that small, hidden dependencies
Alpine image • One Dockerfile • All environments • Small
images • Less dependencies Time: ~11s Size: 59.4MB Still have unwanted dependencies
Alpine image multi-stage • One Dockerfile • All environments •
Small images • Less dependencies Time: ~16s Size: 35.8MB This is ART <3
Comparison table Image Time Size alpine:3.8 - 4.41 MB php:7.2-apache
- 377 MB laravel-apache 39s 430 MB laravel-apache-multi 40s 393 MB laravel-alpine 11s 59.4 MB laravel-alpine-multi 16s 35.8 MB
Conclusion • Care about dependencies • Try different techniques
Thanks!