IBM Cloud & Cognitive — Introduction to Containers ...€¦ · • Container orchestration with...
Transcript of IBM Cloud & Cognitive — Introduction to Containers ...€¦ · • Container orchestration with...
IBM Cloud & Cognitive—
Introduction to containers: How to write a Dockerfile and build an image
Hussah Alakee – Cloud Developer Advocate
Cloud and Cognitive, IBM Saudi
Email: [email protected]: https://www.linkedin.com/in/hessa-alaqeel-811964150/
Lab Prerequisites
• Download the latest version of Docker
• Sign-up or sign-in on IBM Cloud: https://ibm.biz/BdqCFi
• Install IBM Cloud CLI : https://cloud.ibm.com/docs/cli/reference/ibmcloud?topic=cloud-cli-install-ibmcloud-cli
Agenda
• What are containers• Containers Vs. Virtual machines • Beneifits of Containers • Container orchestration with Kubernetes• What is Docker • Why use Docker • Docker tools and terms• Dockerfile• Hands-on lab
IBM Developer
What are Containers?
IBM Developer
Different ArchitecturesContainers Vs. Virtual Machines
IBM Developer
Beneifits of using Containers
• Containers are lightweight
• Portable and platform independent
• Supports modern development and architecture
• Improves utilization
IBM Developer
Container orchestration with Kubernetes
• It can be complex to manage hundreds (or even thousands) of containers across a distributed system.
• To address this challenge, container orchestration emerged as a way managing large volumes of containers throughout their lifecycle.
• Kubernetes enables developers and operators to declare a desired state of their overall container environment
• Kubernetes does all the hard work establishing and maintaining that state, with activities that include deploying a specified number of instances of a given application or workload, rebooting that application if it fails, load balancing, auto-scaling, zero downtime deployments and more.
IBM Developer
Docker
• Docker is an open platform for developing, shippingand running applications
• Docker makes it easier, simpler, and safer to build, deploy, and manage containers.
IBM Developer
Why use Docker
• Improved and seamless portability
• Even lighter weight and more granular updates:
• Automated container creation
• Container versioning
• Container reuse
• Shared container libraries
IBM Developer
Docker Image
- Contains executable application source code as well as all the tools, libraries, and dependencies that the application code needs to run as a container.
Docker Container
-Docker containers are the live, running instances of Docker images.
Docker tools and terms
Dockerfile
- A simple text file containing instructions for how to build the
Docker container image
Docker Hub
-Is the public repository of Docker images
IBM Developer
Dockerfile
• Every Docker container starts with a simple text file containing
instructions for how to build the Docker container image.
• DockerFile automates the process of Docker image creation.
• A DockerFile is essentially a list of commands that Docker Engine will run
in order to assemble the image.
Hands-on Lab
Log-in to IBM Cloud
14
Athuintication
15
Create a container registry name-space
16
Build and tag your container
17
Thank you.
18
Hussah Alakeel
- Be part of our upcoming events on our Meetup page:
https://www.meetup.com/IBM-Developer-KSA
Useful LinksLearn – develop – connect
IBM Developer (developer.ibm.com)
Red Hat courses (https://www.redhat.com/en/services/training/all-courses-exams)
Meetup Page (https://www.meetup.com/IBM-Cloud-MEA/)
20