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
Abdala Cerqueira
August 31, 2018
Technology
390
0
Share
Docker: multi-stage multi-environment
Talk given on Unconference Track in LaraconEU 2018
Abdala Cerqueira
August 31, 2018
More Decks by Abdala Cerqueira
See All by Abdala Cerqueira
Docker: multi-stage and multi-environment
abdala
3
710
Programação também é mágica
abdala
0
170
Websockets e você, tudo a ver
abdala
1
140
PHP em todos os lugares
abdala
1
140
Automatizado rotinas com sua linguagem favorita
abdala
0
100
PHPUnit, ele irá te salvar!
abdala
0
96
Presente! Software Livre
abdala
0
77
Other Decks in Technology
See All in Technology
AI対話分析の夢と、汚いデータの現実 Looker / Dataplex / Dataform で実現する品質ファーストな基盤設計
waiwai2111
0
650
2026-05-14 要件定義からソース管理まで!IBM Bob基礎ハンズオン
yutanonaka
0
170
GCASアップデート(202603-202605)
techniczna
0
220
Directions Asia 2026 | Beyond Buildable AI Agents: Let’s Visualize Partner Value in the AI Era
ryoheig0405
0
110
GitHub Copilot CLI で考える複数エージェント設計
tomokusaba
0
120
"スキルファースト"で作る、AIの自走環境
subroh0508
0
610
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
6
1.4k
PdM・Eng・QAで進めるAI駆動開発の現在地/aidd-with-pdm-eng-qa
shota_kusaba
0
250
Gaussian Splattingの実用化 - 映像制作への展開
gpuunite_official
0
200
AI Agent に“攻略本”を渡したら、150フォームの移行が回り始めた話/登壇資料(高橋 悟生)
hacobu
PRO
0
110
ECSのTerraformモジュールにコントリビュートした話
harukasakihara
0
240
AWS WAFの運用を地道に改善し、自社で運用可能にするプラクティス
andpad
1
530
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Designing Powerful Visuals for Engaging Learning
tmiket
1
370
Ethics towards AI in product and experience design
skipperchong
2
270
Typedesign – Prime Four
hannesfritz
42
3k
Design in an AI World
tapps
1
210
Documentation Writing (for coders)
carmenintech
77
5.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
820
From π to Pie charts
rasagy
0
180
Statistics for Hackers
jakevdp
799
230k
A designer walks into a library…
pauljervisheath
211
24k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
160
The agentic SEO stack - context over prompts
schlessera
0
780
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!