Sample .Introduction To Docker Dark
Sample .Introduction To Docker Dark
This is an introduction to Docker ebook that will help you learn the
basics of Docker and how to start using containers for your SysOps,
DevOps, and Dev projects. No matter if you are a DevOps/SysOps
engineer, developer, or just a Linux enthusiast, you will most likely have
to use Docker at some point in your career.
10
About the author
11
Sponsors
Materialize
DigitalOcean
If you are new to DigitalOcean, you can get a free $100 credit and spin
up your own servers via this referral link here:
12
DevDojo
The DevDojo is a resource to learn all things web development and web
design. Learn on your lunch break or wake up and enjoy a cup of coffee
with us to learn something new.
Join this developer community, and we can all learn together, build
together, and grow together.
Join DevDojo
13
Ebook PDF Generation Tool
14
Book Cover
15
License
MIT License
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
16
Chapter 1: Introduction to
Docker
17
What is Docker?
Key Concepts:
18
Why Use Docker?
19
Docker Architecture
┌─────────────┐ ┌─────────────────────────────────────┐
│ Docker CLI │ │ Docker Host │
│ (docker) │◄───►│ ┌────────────┐ ┌───────────┐ │
└─────────────┘ │ │ Docker │ │ Containers│ │
│ │ Daemon │◄────►│ and │ │
│ │ (dockerd) │ │ Images │ │
│ └────────────┘ └───────────┘ │
└─────────────────────────────────────┘
▲
│
▼
┌─────────────────────┐
│ Docker Registry │
│ (Docker Hub) │
└─────────────────────┘
20
Containers vs. Virtual Machines
While both containers and virtual machines (VMs) are used for isolating
applications, they differ in several key aspects:
21
Basic Docker Workflow
# Build an image
docker build -t myapp:v1 .
22
Docker Components
23
Use Cases for Docker
24
Conclusion
25
Chapter 2: Installing Docker
26
Docker Editions
27
Installing Docker on Linux
Docker runs natively on Linux, making it the ideal platform for Docker
containers. There are two main methods to install Docker on Linux:
using the convenience script or manual installation for specific
distributions.
28
This method is ideal for quick setups and testing environments.
However, for production environments, you might want to consider the
manual installation method for more control over the process.
For more control over the installation process or if you prefer to follow
distribution-specific steps, you can manually install Docker. Here are
instructions for popular Linux distributions:
Docker runs natively on Linux, making it the ideal platform for Docker
containers. Here's how to install Docker on popular Linux distributions:
Ubuntu
2. Install prerequisites:
29
4. Set up the stable repository:
6. Install Docker:
CentOS
30
This is a sample from "Introduction to Docker" by Bobby Iliev.