SlideShare a Scribd company logo
Build - ship - Run
approaches & strategies
Adam Štipák | @new_POPE | adam.stipak@gmail.com
Build - basics
should be “ephemeral”
use .dockerignore
unnecessary packages
only one concern
https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/
number of layers
multi-line arguments
cache
Build - simple version
all in one
for simple projects
Build - advanced version
one image per service
build & dev dependencies (extra image?)
cache (composer, npm, yarn, gem, etc.)
push & pull
Build - my tips
strategy depends by project
all in one (e.g. nginx + php-fpm, from official image, from scratch)
dev dependencies packed in image
option to enable/disable it
don’t use standalone dev & prod image
development (test) image “extend” production image
Run - options
1. docker run …
2. docker-compose up & run
3. swarm mode
4. portainer.io, kubernetes.io, EC2 Container Service, etc.
Run - docker run ...
examples & tutorials
library development (cd myproject && docker run -v $(pwd):/src php7.1)
all in one image
Run - docker-compose up & run
development vs. test, stage (CI) vs. production issues
more compose files
-f base.yml -f dev.yml
extends (removed in docker compose v3)
standalone (docker-compose.dev.yml, ...test.yml, ...prod.yml)
Run - my tips
using only docker-compose for run
except kubernetes, portainer, ...
compose file per environment
database init for tests
Thank you!
Adam Štipák | @new_POPE | adam.stipak@gmail.com

More Related Content

PDF
Gulp and Compass
PDF
TDC2016SP - Trilha DevOps Java
PDF
PROCESS WARP
PDF
Portable class library to .NET Standard Extension
PDF
An Overview of the Open Source Vulkan Driver for Raspberry Pi 4
PDF
Fixing Gaps. Strengthening the Chromium platform for content blocking
PDF
Multi modularized project setup with gulp, typescript and angular.js
PDF
Deployment Automation with Docker
Gulp and Compass
TDC2016SP - Trilha DevOps Java
PROCESS WARP
Portable class library to .NET Standard Extension
An Overview of the Open Source Vulkan Driver for Raspberry Pi 4
Fixing Gaps. Strengthening the Chromium platform for content blocking
Multi modularized project setup with gulp, typescript and angular.js
Deployment Automation with Docker

Similar to Rubyslava #66 (container edition) (20)

PDF
Introducción a contenedores Docker
PDF
Serverless Container with Source2Image
PDF
Serverless containers … with source-to-image
PPTX
Simply your Jenkins Projects with Docker Multi-Stage Builds
PPTX
[Codelab 2017] Docker 기초 및 활용 방안
PPTX
Develop with docker 2014 aug
PDF
DevOps Workflow: A Tutorial on Linux Containers
PDF
Continuous Integration with Docker on AWS
PDF
Docker Introduction.pdf
PDF
DCSF19 Dockerfile Best Practices
PPTX
Codefresh + Cloud 66 webinar: Testing Strategies for Docker Driven Development
PPTX
Dockerizing a Symfony2 application
PPTX
Django via Docker
PPTX
Docker for developers z java
PDF
Docker as development environment
PPTX
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
PDF
Introduction to Docker
PDF
Features everywhere
ODP
Introduction to Docker for NodeJs developers at Node DC 2/26/2014
PPTX
Docker 101
Introducción a contenedores Docker
Serverless Container with Source2Image
Serverless containers … with source-to-image
Simply your Jenkins Projects with Docker Multi-Stage Builds
[Codelab 2017] Docker 기초 및 활용 방안
Develop with docker 2014 aug
DevOps Workflow: A Tutorial on Linux Containers
Continuous Integration with Docker on AWS
Docker Introduction.pdf
DCSF19 Dockerfile Best Practices
Codefresh + Cloud 66 webinar: Testing Strategies for Docker Driven Development
Dockerizing a Symfony2 application
Django via Docker
Docker for developers z java
Docker as development environment
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
Introduction to Docker
Features everywhere
Introduction to Docker for NodeJs developers at Node DC 2/26/2014
Docker 101
Ad

More from Adam Štipák (18)

PDF
Techforce #5 es in 2018
PDF
FEI Bratislava 2017 - Docker
PDF
Wordcamp Bratislava 2017 - Docker! Why?
PDF
Introduction to Domain Driven Design (Webtlak #7)
PDF
Introduction to Docker
PPTX
from docker run to docker compose (Webelement #36)
PDF
Docker for local development
PDF
Improve your workflow
PDF
Docker on OSX without pain
PDF
Testing with Codeception (Webelement #30)
PDF
How to be a full stack developer
PDF
Independent components in Nette Framework
PDF
Nette framework (WebElement #28)
PDF
Nette framework (WebElement #27 lightning talk)
PDF
FEI 2013 - Nette framework
PDF
One page app with AngularJS
PDF
FEI - Nette framework
Techforce #5 es in 2018
FEI Bratislava 2017 - Docker
Wordcamp Bratislava 2017 - Docker! Why?
Introduction to Domain Driven Design (Webtlak #7)
Introduction to Docker
from docker run to docker compose (Webelement #36)
Docker for local development
Improve your workflow
Docker on OSX without pain
Testing with Codeception (Webelement #30)
How to be a full stack developer
Independent components in Nette Framework
Nette framework (WebElement #28)
Nette framework (WebElement #27 lightning talk)
FEI 2013 - Nette framework
One page app with AngularJS
FEI - Nette framework
Ad

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Cloud computing and distributed systems.
PDF
Unlocking AI with Model Context Protocol (MCP)
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation theory and applications.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
KodekX | Application Modernization Development
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Teaching material agriculture food technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Cloud computing and distributed systems.
Unlocking AI with Model Context Protocol (MCP)
The AUB Centre for AI in Media Proposal.docx
Understanding_Digital_Forensics_Presentation.pptx
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation theory and applications.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
KodekX | Application Modernization Development
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Encapsulation_ Review paper, used for researhc scholars
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
cuic standard and advanced reporting.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

Rubyslava #66 (container edition)

  • 1. Build - ship - Run approaches & strategies Adam Štipák | @new_POPE | adam.stipak@gmail.com
  • 2. Build - basics should be “ephemeral” use .dockerignore unnecessary packages only one concern https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/ number of layers multi-line arguments cache
  • 3. Build - simple version all in one for simple projects
  • 4. Build - advanced version one image per service build & dev dependencies (extra image?) cache (composer, npm, yarn, gem, etc.) push & pull
  • 5. Build - my tips strategy depends by project all in one (e.g. nginx + php-fpm, from official image, from scratch) dev dependencies packed in image option to enable/disable it don’t use standalone dev & prod image development (test) image “extend” production image
  • 6. Run - options 1. docker run … 2. docker-compose up & run 3. swarm mode 4. portainer.io, kubernetes.io, EC2 Container Service, etc.
  • 7. Run - docker run ... examples & tutorials library development (cd myproject && docker run -v $(pwd):/src php7.1) all in one image
  • 8. Run - docker-compose up & run development vs. test, stage (CI) vs. production issues more compose files -f base.yml -f dev.yml extends (removed in docker compose v3) standalone (docker-compose.dev.yml, ...test.yml, ...prod.yml)
  • 9. Run - my tips using only docker-compose for run except kubernetes, portainer, ... compose file per environment database init for tests
  • 10. Thank you! Adam Štipák | @new_POPE | adam.stipak@gmail.com