SlideShare a Scribd company logo
1 of 4
Docker in the Real World
GROUP EXERCISES
Dockerfile Best Practices
Resources
• Alpine:
• https://github.com/gliderlabs/docker-alpine
• https://pkgs.alpinelinux.org/packages
• CentOS:
• https://hub.docker.com/_/centos
• Ubuntu:
• https://hub.docker.com/_/ubuntu
• Examples: https://github.com/jschorr/dirw-class/tree/master/examples/real-life
Dockerfile Best Practices
Break into groups of 2-3 and decide who will do the typing for the group. Write an image together that
complies with as many of the following as possible:
• Is relatively small.
• Installs the curl and htop packages.
• Has few layers.
• Runs as a limited user.
• Copies in a script and makes it executable.
• The script runs at runtime.
Be sure to develop the image based upon Alpine, CentOS, and Ubuntu.
Multi-stage builds: follow the instructions at examples/docker/rust-hello-world.
Docker Compose
Follow the instructions here to build a Django application that relies upon PostgreSQL:
https://docs.docker.com/compose/django/

More Related Content

What's hot

What's hot (20)

Docker Compose: Docker Configuration for the Real World
Docker Compose:  Docker Configuration for the Real WorldDocker Compose:  Docker Configuration for the Real World
Docker Compose: Docker Configuration for the Real World
 
Cohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraCohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel Palstra
 
Docker
DockerDocker
Docker
 
Introduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate WorkshopIntroduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate Workshop
 
Docker intro
Docker introDocker intro
Docker intro
 
Arquitectura de Microservicios con .NET Core y Contenedores
Arquitectura de Microservicios con .NET Core y ContenedoresArquitectura de Microservicios con .NET Core y Contenedores
Arquitectura de Microservicios con .NET Core y Contenedores
 
Docker at CrowdTwist
Docker at CrowdTwistDocker at CrowdTwist
Docker at CrowdTwist
 
docker compose
docker composedocker compose
docker compose
 
Introduction to Docker - What is it and how is it compared to VM's
Introduction to Docker - What is it and how is it compared to VM'sIntroduction to Docker - What is it and how is it compared to VM's
Introduction to Docker - What is it and how is it compared to VM's
 
Automating Docker Containers with Puppet 2014 10-13
Automating Docker Containers with Puppet 2014 10-13Automating Docker Containers with Puppet 2014 10-13
Automating Docker Containers with Puppet 2014 10-13
 
Supercharge ml using docker
Supercharge ml using dockerSupercharge ml using docker
Supercharge ml using docker
 
Docker Clustering - Batteries Included
Docker Clustering - Batteries IncludedDocker Clustering - Batteries Included
Docker Clustering - Batteries Included
 
An introduction to contianers and Docker for PHP developers
An introduction to contianers and Docker for PHP developersAn introduction to contianers and Docker for PHP developers
An introduction to contianers and Docker for PHP developers
 
Introduction to docker and docker compose
Introduction to docker and docker composeIntroduction to docker and docker compose
Introduction to docker and docker compose
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Docker For Windows | Setting Up Docker On Windows | Edureka
Docker For Windows | Setting Up Docker On Windows | EdurekaDocker For Windows | Setting Up Docker On Windows | Edureka
Docker For Windows | Setting Up Docker On Windows | Edureka
 
Big Boards & docker
Big Boards & dockerBig Boards & docker
Big Boards & docker
 
Docker compose
Docker composeDocker compose
Docker compose
 
Docker Oxford launch - Introduction to Docker
Docker Oxford launch - Introduction to DockerDocker Oxford launch - Introduction to Docker
Docker Oxford launch - Introduction to Docker
 
Kubernetes kubecon-roundup
Kubernetes kubecon-roundupKubernetes kubecon-roundup
Kubernetes kubecon-roundup
 

Similar to Docker in the Real World - Group Exercises

Securing Containers From Day One | null Ahmedabad Meetup
Securing Containers From Day One | null Ahmedabad MeetupSecuring Containers From Day One | null Ahmedabad Meetup
Securing Containers From Day One | null Ahmedabad Meetup
Kumar Ashwin
 

Similar to Docker in the Real World - Group Exercises (20)

Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker tips
Docker tipsDocker tips
Docker tips
 
Docker
DockerDocker
Docker
 
Securing Containers From Day One | null Ahmedabad Meetup
Securing Containers From Day One | null Ahmedabad MeetupSecuring Containers From Day One | null Ahmedabad Meetup
Securing Containers From Day One | null Ahmedabad Meetup
 
Securing Containers From Day One | null Ahmedabad Meetup
Securing Containers From Day One | null Ahmedabad MeetupSecuring Containers From Day One | null Ahmedabad Meetup
Securing Containers From Day One | null Ahmedabad Meetup
 
Dockercon EU 2014
Dockercon EU 2014Dockercon EU 2014
Dockercon EU 2014
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and tools
 
Running the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerRunning the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker Container
 
Docker, LinuX Container
Docker, LinuX ContainerDocker, LinuX Container
Docker, LinuX Container
 
Virtualization, Containers, Docker and scalable container management services
Virtualization, Containers, Docker and scalable container management servicesVirtualization, Containers, Docker and scalable container management services
Virtualization, Containers, Docker and scalable container management services
 
Webinar: Development Swarm Cluster with Docker Compose V3
Webinar: Development Swarm Cluster with Docker Compose V3Webinar: Development Swarm Cluster with Docker Compose V3
Webinar: Development Swarm Cluster with Docker Compose V3
 
Docker
DockerDocker
Docker
 
Django and Docker
Django and DockerDjango and Docker
Django and Docker
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken Cochrane
 
Development Swarm Cluster
Development Swarm ClusterDevelopment Swarm Cluster
Development Swarm Cluster
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
 
docker installation and basics
docker installation and basicsdocker installation and basics
docker installation and basics
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 

Docker in the Real World - Group Exercises

  • 1. Docker in the Real World GROUP EXERCISES
  • 2. Dockerfile Best Practices Resources • Alpine: • https://github.com/gliderlabs/docker-alpine • https://pkgs.alpinelinux.org/packages • CentOS: • https://hub.docker.com/_/centos • Ubuntu: • https://hub.docker.com/_/ubuntu • Examples: https://github.com/jschorr/dirw-class/tree/master/examples/real-life
  • 3. Dockerfile Best Practices Break into groups of 2-3 and decide who will do the typing for the group. Write an image together that complies with as many of the following as possible: • Is relatively small. • Installs the curl and htop packages. • Has few layers. • Runs as a limited user. • Copies in a script and makes it executable. • The script runs at runtime. Be sure to develop the image based upon Alpine, CentOS, and Ubuntu. Multi-stage builds: follow the instructions at examples/docker/rust-hello-world.
  • 4. Docker Compose Follow the instructions here to build a Django application that relies upon PostgreSQL: https://docs.docker.com/compose/django/