Zum Hauptinhalt springen Zur Suche springen Zur Hauptnavigation springen

Practical Docker with Python

56,99 €

Sofort verfügbar, Lieferzeit: Sofort lieferbar

Format auswählen
Produkt Anzahl: Gib den gewünschten Wert ein oder benutze die Schaltflächen um die Anzahl zu erhöhen oder zu reduzieren.

Practical Docker with Python, Apress
Build, Release, and Distribute Your Python App with Docker
Von Sathyajith Bhat, im heise Shop in digitaler Fassung erhältlich

Produktinformationen "Practical Docker with Python"

Learn the fundamentals of containerization and get acquainted with Docker. This second edition builds upon the foundation of the first book by revising all the chapters, updating the commands, code, and examples to meet the changes in Docker. It also introduces a new chapter on setting up your application for production deployment and breaks down terminologies like Dockerfile and Docker volumes while taking you on a guided tour of building a telegram bot using Python.

You'll start with a brief history of how containerization has changed over the years. Next, we look at how to install (including using the new WSL2 mode) and get started with Docker. The next couple of chapters will focus on understanding the Dockerfile, including the structure and the core instructions used in building a Docker image. You'll also see how to distribute Docker images using Docker hub and other private registries. From there, you'll look at using Docker volumes for persisting data. Then learn how to run multi-container applications with Docker compose and learn inter-container networking works with Docker networks. Finally, you'll look at how to prepare a containerized application for production deployments.

Throughout the book you'll apply the techniques learned through the chapters by building a Telegram messenger Chatbot and see how much easier Docker makes it possible to build, release, contribute and distribute an application. In addition, the book shows how optimize the Docker images for production servers by using multi-stage builds and improve the reliability of your services by using health checks and restart policies. Practical Docker with Python will break down terminologies like Dockerfile and Docker volumes, and take you on a guided tour of building a telegram bot using Python.

WHAT YOU'LL LEARN

*
Compare the difference between containerization and virtualization*
Understand the Dockerfile and converting your application to Docker image*
Define and run multi-container applications with Docker compose*
Review data persistency with Docker volumes


WHO THIS BOOK IS FOR

Beginner and intermediate developers, DevOps practitioners who are looking improving their build and release workflow by containerizing applications as well as system administrators learning to implement DevOps principles.

Sathyajith Bhat is a seasoned DevOps/SRE professional currently working as a DevOps Engineer on Adobe I/O, which is Adobe’s developer ecosystem and community. Prior to this, he was the lead Ops/SRE at Styletag.com. He transitioned to Ops/SRE after being a lead analyst at CGI, working primarily on Oracle Fusion stack (Oracle DB/PL/SQL/Oracle Forms and other related middleware) designing, architecting, and implementing complete end-to-end solutions for a major insurance provider in the Nordics.

In his free time, Sathya is part of the Barcamp Bangalore planning team, handling DevOps and Social Media for BCB. He is also a volunteer Community Moderator at Super User and Web Apps Stack Exchange, keeps the servers for Indian Video Gamer forums up and running, and was previously a Moderator for Chip-India and Tech 2 forums.

Chapter 1: Introduction to Containerization & Docker

Chapter Goal: Brief intro into containerization, how they compare to virtual machines, Intro to Docker and getting the reader ready for the practical aspects of the book

No of pages

Sub -Topics

1. What are containers

2. Containers vs Virtual machines

3. Introduction to Docker

4. CONTAINER RUNTIMES (OCI, CRI-O, CONTAINERD)

Chapter 2: Docker 101

Chapter Goal: Getting started with Docker, running a sample container

No of pages:

Sub - Topics:

1. INSTALLING DOCKER (INCLUDING CHANGES FOR INSTALLING DOCKER FOR WINDOWS USING THE WSL2 ENGINE)

2. Checking if Docker is ready

3. Docker client

4. Understanding Jargon around Docker (INCLUDING DOCKER REGISTRIES, REPOSITORIES, TAGS)5. Running/stopping/ connecting a docker container

6. Dockerfile brief

7. Practical: Running a simple container, hands-on some common Docker commands

Chapter 3: Building the Python App

Chapter Goal: Getting to understand the project, APIs involved, pre-requisites

No of pages:

Sub - Topics:

1. Project description (delivering latest content from Reddit to Telegram messenger)

2. Setting up the Python workspace (installing the required libraries, setting up virtualenv)

3. Creating a Telegram bot

4. Running the Python application and confirming bot works

Chapter 4: Understanding Dockerfile

Chapter Goal: Getting to know Dockerfile, the different constructs and concepts

No of pages:

Sub - Topics:

1. Dockerfile, dockerignore2. Base image & using them with “from …”

3. RUN/CMD/Environment variables

4. HOW AND WHY TO TAG DOCKER IMAGES

5. WHY TO AVOID THE ‘LATEST’ TAG

6. Practical: Modifying sample Dockerfile to run our Project

Chapter 5: Understanding Docker Volumes

Chapter Goal: Containers are meant for stateless applications. Chapter explains steps needed to persist data

1. Problem of stateful applications in containers

2. Docker volumes

3. Practical: Show how data in containers is lost when container is killed and how Docker volumes avoid this

4. Practical: Modifying our project Dockerfile to add Docker volumes

Chapter 6: Docker Networking

Chapter Goal: Overview of Docker networking, linking containers

1. Docker bridged network

2. User defined networks

3. Practical: Create a Database container and link it with our project application server container

Chapter 7: Multi Container Applications

Chapter Goal: Building multi-container applications with Docker compose

1. A LOOK AT DOCKER-COMPOSE VERSUS DOCKER COMPOSE

2. Docker Compose file reference

3. Linking/establishing dependencies across containers

4. Environment variables across linked containers

5. Practical: Moving our project from separate linked containers to Docker Compose project

CHAPTER 8: PREPARING FOR PRODUCTION DEPLOYMENTS1. WHAT IS ORCHESTRATION AND WHY DO WE NEED ORCHESTRATION

2. SETTING UP CI WITH GITHUB ACTIONS TO BUILD A NEW IMAGE ON EVERY COMMIT

3. TIPS TO SETUP YOUR PRODUCTION DOCKER HOSTS AND CONTAINERS

4. DEPLOYING YOUR CONTAINER IMAGE TO KUBERNETES

Artikel-Details

Anbieter:
Apress
Autor:
Sathyajith Bhat
Artikelnummer:
9781484278154
Veröffentlicht:
27.11.21
Seitenanzahl:
239