Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Docker: multi-stage multi-environment
Search
Abdala Cerqueira
August 31, 2018
Technology
390
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
740
Programação também é mágica
abdala
0
180
Websockets e você, tudo a ver
abdala
1
140
PHP em todos os lugares
abdala
1
150
Automatizado rotinas com sua linguagem favorita
abdala
0
120
PHPUnit, ele irá te salvar!
abdala
0
110
Presente! Software Livre
abdala
0
82
Other Decks in Technology
See All in Technology
[2026-09-30]ロックンロールは鳴り止まないっ - 信頼性かまってちゃん - 「データ駆動を投げ捨ててまで。」追いかける信頼性改善に向けた取り組みの話
tosite
0
200
個別開発で終わらせない。 現場の課題をプロダクトの強さに変える StockmarkのFDE
ktkrhr
0
590
Claude起点の仕様駆動開発
tanakaseiya
0
380
freeeらしさをAIとともに作る / Creating the freee Experience with AI
ymrl
0
200
Databricksメトリクスビューはじめてのもくもく会
taka_aki
0
200
組み立てて楽しむ AWS Blocks 入門
kmiya84377
0
210
1万名の社員が使う認証基盤で どう信頼性を担保するか?
kairim0
0
210
データ品質を壊しながらSnowflakeのAIに分析させてみた
kawanago
0
510
OSC2026on_the-world-is-waiting-for-your-voice.pdf
naruoga
0
350
IoTデバイスを繋げるプロトコルMatterをAndroidで使用する方法
harutiro
0
120
AI時代だからこそ推したい!Gitコマンド再入門
munakata
0
150
ai_cording_with_k8s_knowledge.pdf
mochizuki875
1
280
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
76k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
350
Google's AI Overviews - The New Search
badams
0
1.6k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
920
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
Embracing the Ebb and Flow
colly
88
5.2k
YesSQL, Process and Tooling at Scale
rocio
174
15k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
460
Done Done
chrislema
187
17k
Navigating Weather and Climate Data
rabernat
0
550
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
550
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!