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
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
670
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
99
PHPUnit, ele irá te salvar!
abdala
0
89
Presente! Software Livre
abdala
0
73
Other Decks in Technology
See All in Technology
国井さんにPurview の話を聞く会
sophiakunii
1
420
Exadata Database Service ソフトウェアのアップデートとアップグレードの概要
oracle4engineer
PRO
1
1.1k
「アウトプット脳からユーザー価値脳へ」がそんなに簡単にできたら苦労しない #RSGT2026
aki_iinuma
11
5.6k
20260114_データ横丁 新年LT大会:2026年の抱負
taromatsui_cccmkhd
0
310
ソフトとハード両方いけるデータ人材の育て方
waiwai2111
1
480
AI Agent Agentic Workflow の可観測性 / Observability of AI Agent Agentic Workflow
yuzujoe
4
2.1k
歴史から学ぶ、Goのメモリ管理基礎
logica0419
14
2.9k
形式手法特論:コンパイラの「正しさ」は証明できるか? #burikaigi / BuriKaigi 2026
ytaka23
17
6.3k
Data Hubグループ 紹介資料
sansan33
PRO
0
2.6k
Qiita Bash アドカレ LT #1
okaru
0
190
2026/01/16_実体験から学ぶ 2025年の失敗と対策_Progate Bar
teba_eleven
1
200
I tried making a solo advent calendar!
zzzzico
0
150
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Site-Speed That Sticks
csswizardry
13
1k
The agentic SEO stack - context over prompts
schlessera
0
590
Thoughts on Productivity
jonyablonski
74
5k
Claude Code のすすめ
schroneko
67
210k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Crafting Experiences
bethany
0
32
First, design no harm
axbom
PRO
2
1.1k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
43
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
430
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
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!