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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
720
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
150
Automatizado rotinas com sua linguagem favorita
abdala
0
110
PHPUnit, ele irá te salvar!
abdala
0
100
Presente! Software Livre
abdala
0
81
Other Decks in Technology
See All in Technology
OTel × Datadog で 「AI活用」を計測し、改善に繋げる
shihochan
2
570
FPGAの開発コンペでZephyrを使ってみた
iotengineer22
0
180
5分でわかるDuckDB Quack
chanyou0311
2
190
GitHub Copilot 最新アップデート – 「一歩先」の実践活用術
moulongzhang
5
1.6k
2026年6月23日 Syncable Tech + Start Python Club にて
hamukazu
0
140
データレイクの「見えない問題」を可視化する
sansantech
PRO
1
180
新しいUbuntu/GNOMEが使いたいからXからWaylandへ移行頑張ってるの巻 2026-06-20
nobutomurata
0
160
[チョークトーク資料]AWS DevOps Agent を使いこなす / AWS Dev Ops Agent Chalk Talk AWS Summit Japan 2026
kinunori
3
740
事業会社における 機械学習・推薦システム技術の活用事例と必要な能力 / ml-recsys-in-layerx-wantedly-2026
yuya4
0
120
GitHub Copilot app最速の発信の裏側
tomokusaba
1
240
SteampipeとExcel Power QueryでAWS構成定義書の作成を自動化する
jhashimoto
0
170
PostgreSQL 19 新機能概要 OSC Hokkaido 2026
nori_shinoda
0
210
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
200
WENDY [Excerpt]
tessaabrams
11
38k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
210
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
580
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
290
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
200
Claude Code のすすめ
schroneko
67
230k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
170
Navigating Weather and Climate Data
rabernat
0
230
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Balancing Empowerment & Direction
lara
6
1.2k
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!