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
400
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
160
Automatizado rotinas com sua linguagem favorita
abdala
0
120
PHPUnit, ele irá te salvar!
abdala
0
110
Presente! Software Livre
abdala
0
87
Other Decks in Technology
See All in Technology
ドメインエキスパートは いかにして AI を使って プロダクト開発をするか
tatsuyashiraishi
1
190
Devin プロモコードの受け取りと適用(2026.10.27)
kinopeee
0
510
演劇と私とスクラム
chinmo
0
160
撮るだけでは終わらない。ソニーが挑むB2Bカメラソリューション開発
sony
0
110
reInvent2026stby LT00 "Change your life!"
shinichirokawano
1
300
LLM-as-a-Judgeは本当に信頼できるのか――評価器を評価する話
taka_aki
3
1.1k
Filter What the LLM Reads: RAG Governance with AgentCore Gateway
yakumo
0
110
ビジネス部門からPOを迎えての半年間の進歩と課題
zozotech
PRO
0
150
クラウドサインを止めずに Nuxt へ 次の10年のために先に決めたこと
bengo4com
1
160
バフェットコード開発チームの心得(v1.1)
shoe116
0
110
クラウドエージェントの先駆け Devin。今も最先端を走る、他との違い
kinopeee
0
400
ガチで放置できるClaude Code実行環境の作り方.pdf
lamaglama39
5
9.8k
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
4
4k
Evolving SEO for Evolving Search Engines
ryanjones
0
330
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
350
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k
Marketing to machines
jonoalderson
1
5.9k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
900
Embracing the Ebb and Flow
colly
88
5.2k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
590
Visualization
eitanlees
153
17k
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!